javadoc cleanup after review

This commit is contained in:
zzz
2010-03-15 14:34:25 +00:00
parent 9df87ba167
commit 52e2aaa20d
11 changed files with 27 additions and 18 deletions

View File

@ -17,18 +17,13 @@ import net.i2p.util.PartialEepGet;
import net.i2p.util.VersionComparator; import net.i2p.util.VersionComparator;
/** /**
* Download and install a plugin. * Check for an updated version of a plugin.
* A plugin is a standard .sud file with a 40-byte signature, * A plugin is a standard .sud file with a 40-byte signature,
* a 16-byte version, and a .zip file. * a 16-byte version, and a .zip file.
* Unlike for router updates, we need not have the public key
* for the signature in advance.
* *
* The zip file must have a standard directory layout, with * So we get the current version and update URL for the installed plugin,
* a plugin.config file at the top level. * then fetch the first 56 bytes of the URL, extract the version,
* The config file contains properties for the package name, version, * and compare.
* signing public key, and other settings.
* The zip file will typically contain a webapps/ or lib/ dir,
* and a webapps.config and/or clients.config file.
* *
* @since 0.7.12 * @since 0.7.12
* @author zzz * @author zzz

View File

@ -16,7 +16,7 @@ import org.mortbay.jetty.servlet.WebApplicationContext;
* individual jars and not lib/*.jar specified in wrapper.config. * individual jars and not lib/*.jar specified in wrapper.config.
* *
* A sample line in webapps.config is: * A sample line in webapps.config is:
* webapps.appname.path=foo.jar,$I2P/lib/bar.jar * webapps.appname.classpath=foo.jar,$I2P/lib/bar.jar
* Unless $I2P is specified the path will be relative to $I2P/lib for * Unless $I2P is specified the path will be relative to $I2P/lib for
* webapps in the installation and appDir/plugins/appname/lib for plugins. * webapps in the installation and appDir/plugins/appname/lib for plugins.
* *

View File

@ -15,13 +15,14 @@ import org.mortbay.jetty.servlet.WebApplicationContext;
/** /**
* Start a webappapp classpath as specified in webapps.config. * Add, start or stop a webapp.
* Add to the webapp classpath if specified in webapps.config.
* *
* Sadly, setting Class-Path in MANIFEST.MF doesn't work for jetty wars. * Sadly, setting Class-Path in MANIFEST.MF doesn't work for jetty wars.
* We could look there ourselves, or look for another properties file in the war, * See WebAppConfiguration for more information.
* but let's just do it in webapps.config. * but let's just do it in webapps.config.
* *
* No, wac.addClassPath() does not work. * No, wac.addClassPath() does not work. For more info see:
* *
* http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support * http://servlets.com/archive/servlet/ReadMsg?msgId=511113&listName=jetty-support
* *

View File

@ -404,6 +404,8 @@ D8usM7Dxp5yrDrCYZ5AIijc=
* *
* @return The version string read, or an empty string if no version string * @return The version string read, or an empty string if no version string
* is present. * is present.
*
* @since 0.7.12
*/ */
public static String getVersionString(InputStream inputStream) { public static String getVersionString(InputStream inputStream) {
try { try {
@ -492,6 +494,8 @@ D8usM7Dxp5yrDrCYZ5AIijc=
* *
* @return <code>null</code> if the * @return <code>null</code> if the
* data was moved, and an error <code>String</code> otherwise. * data was moved, and an error <code>String</code> otherwise.
*
* @since 0.7.12
*/ */
public String migrateFile(File signedFile, File outputFile) { public String migrateFile(File signedFile, File outputFile) {
if (!signedFile.exists()) if (!signedFile.exists())

View File

@ -252,6 +252,8 @@ public class Timestamper implements Runnable {
/** /**
* Notify the listeners * Notify the listeners
*
* @since stratum param added in 0.7.12
*/ */
private void stampTime(long now, int stratum) { private void stampTime(long now, int stratum) {
long before = _context.clock().now(); long before = _context.clock().now();

View File

@ -1,4 +1,4 @@
2010-03-013 zzz 2010-03-13 zzz
* Partial fix for i2ptunnel nonce troubles * Partial fix for i2ptunnel nonce troubles
2010-03-08 zzz 2010-03-08 zzz

View File

@ -19,7 +19,7 @@ public class TunnelBuildMessage extends I2NPMessageImpl {
this(context, MAX_RECORD_COUNT); this(context, MAX_RECORD_COUNT);
} }
/** @since 0.7.10 */ /** @since 0.7.12 */
protected TunnelBuildMessage(I2PAppContext context, int records) { protected TunnelBuildMessage(I2PAppContext context, int records) {
super(context); super(context);
if (records > 0) { if (records > 0) {
@ -31,7 +31,7 @@ public class TunnelBuildMessage extends I2NPMessageImpl {
public void setRecord(int index, ByteArray record) { _records[index] = record; } public void setRecord(int index, ByteArray record) { _records[index] = record; }
public ByteArray getRecord(int index) { return _records[index]; } public ByteArray getRecord(int index) { return _records[index]; }
/** @since 0.7.10 */ /** @since 0.7.12 */
public int getRecordCount() { return RECORD_COUNT; } public int getRecordCount() { return RECORD_COUNT; }
public static final int RECORD_SIZE = 512+16; public static final int RECORD_SIZE = 512+16;

View File

@ -20,7 +20,7 @@ public class TunnelBuildReplyMessage extends I2NPMessageImpl {
this(context, MAX_RECORD_COUNT); this(context, MAX_RECORD_COUNT);
} }
/** @since 0.7.10 */ /** @since 0.7.12 */
protected TunnelBuildReplyMessage(I2PAppContext context, int records) { protected TunnelBuildReplyMessage(I2PAppContext context, int records) {
super(context); super(context);
if (records > 0) { if (records > 0) {
@ -32,7 +32,7 @@ public class TunnelBuildReplyMessage extends I2NPMessageImpl {
public void setRecord(int index, ByteArray record) { _records[index] = record; } public void setRecord(int index, ByteArray record) { _records[index] = record; }
public ByteArray getRecord(int index) { return _records[index]; } public ByteArray getRecord(int index) { return _records[index]; }
/** @since 0.7.10 */ /** @since 0.7.12 */
public int getRecordCount() { return RECORD_COUNT; } public int getRecordCount() { return RECORD_COUNT; }
public static final int RECORD_SIZE = TunnelBuildMessage.RECORD_SIZE; public static final int RECORD_SIZE = TunnelBuildMessage.RECORD_SIZE;

View File

@ -93,6 +93,8 @@ public class ClientAppConfig {
/* /*
* Go through the properties, and return a List of ClientAppConfig structures * Go through the properties, and return a List of ClientAppConfig structures
*
* @since 0.7.12
*/ */
public static List<ClientAppConfig> getClientApps(File cfgFile) { public static List<ClientAppConfig> getClientApps(File cfgFile) {
Properties clientApps = new Properties(); Properties clientApps = new Properties();
@ -106,6 +108,8 @@ public class ClientAppConfig {
/* /*
* Go through the properties, and return a List of ClientAppConfig structures * Go through the properties, and return a List of ClientAppConfig structures
*
* @since 0.7.12
*/ */
private static List<ClientAppConfig> getClientApps(Properties clientApps) { private static List<ClientAppConfig> getClientApps(Properties clientApps) {
List<ClientAppConfig> rv = new ArrayList(8); List<ClientAppConfig> rv = new ArrayList(8);

View File

@ -506,6 +506,7 @@ class BuildExecutor implements Runnable {
/** /**
* Only do this for non-fallback tunnels. * Only do this for non-fallback tunnels.
* @return true if refused because of a duplicate key * @return true if refused because of a duplicate key
* @since 0.7.12
*/ */
private boolean addToBuilding(PooledTunnelCreatorConfig cfg) { private boolean addToBuilding(PooledTunnelCreatorConfig cfg) {
//_log.error("Adding ID: " + cfg.getReplyMessageId() + "; size was: " + _currentlyBuildingMap.size()); //_log.error("Adding ID: " + cfg.getReplyMessageId() + "; size was: " + _currentlyBuildingMap.size());
@ -521,6 +522,7 @@ class BuildExecutor implements Runnable {
* But that's ok. A peer that rejects slowly gets penalized twice, for example. * But that's ok. A peer that rejects slowly gets penalized twice, for example.
* *
* @return ptcc or null * @return ptcc or null
* @since 0.7.12
*/ */
PooledTunnelCreatorConfig removeFromBuilding(long id) { PooledTunnelCreatorConfig removeFromBuilding(long id) {
//_log.error("Removing ID: " + id + "; size was: " + _currentlyBuildingMap.size()); //_log.error("Removing ID: " + id + "; size was: " + _currentlyBuildingMap.size());

View File

@ -187,6 +187,7 @@ class BuildRequestor {
SHORT_ORDER.add(Integer.valueOf(i)); SHORT_ORDER.add(Integer.valueOf(i));
} }
/** @since 0.7.12 */
private static boolean supportsVariable(RouterContext ctx, Hash h) { private static boolean supportsVariable(RouterContext ctx, Hash h) {
RouterInfo ri = ctx.netDb().lookupRouterInfoLocally(h); RouterInfo ri = ctx.netDb().lookupRouterInfoLocally(h);
if (ri == null) if (ri == null)