From a9eb48c4c63e3e26bdd3f1fb7d52b81ec206dfa3 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 27 Jan 2013 16:20:26 +0000 Subject: [PATCH] javadoc --- router/java/src/net/i2p/router/InNetMessagePool.java | 4 ++++ router/java/src/net/i2p/router/RouterThrottleImpl.java | 3 +++ .../net/i2p/router/transport/TransportEventListener.java | 9 +++++++++ .../java/src/net/i2p/router/transport/TransportImpl.java | 3 +++ .../src/net/i2p/router/transport/TransportManager.java | 7 +++++++ 5 files changed, 26 insertions(+) diff --git a/router/java/src/net/i2p/router/InNetMessagePool.java b/router/java/src/net/i2p/router/InNetMessagePool.java index fc86f2b1a5..4d5c1f506a 100644 --- a/router/java/src/net/i2p/router/InNetMessagePool.java +++ b/router/java/src/net/i2p/router/InNetMessagePool.java @@ -116,6 +116,10 @@ public class InNetMessagePool implements Service { * into a job created by that builder and queued up for processing instead * (though if the builder doesn't create a job, it is added to the pool) * + * @param messageBody non-null + * @param fromRouter may be null + * @param fromRouterHash may be null, calculated from fromRouter if null + * * @return -1 for some types of errors but not all; 0 otherwise * (was queue length, long ago) */ diff --git a/router/java/src/net/i2p/router/RouterThrottleImpl.java b/router/java/src/net/i2p/router/RouterThrottleImpl.java index b7237c559f..dd9ef576fe 100644 --- a/router/java/src/net/i2p/router/RouterThrottleImpl.java +++ b/router/java/src/net/i2p/router/RouterThrottleImpl.java @@ -101,6 +101,9 @@ class RouterThrottleImpl implements RouterThrottle { } } + /** + * @return 0 for accept or nonzero reject code + */ public int acceptTunnelRequest() { if (_context.getProperty(Router.PROP_SHUTDOWN_IN_PROGRESS) != null) { if (_log.shouldLog(Log.WARN)) diff --git a/router/java/src/net/i2p/router/transport/TransportEventListener.java b/router/java/src/net/i2p/router/transport/TransportEventListener.java index 2be28bea41..9a6d80d1ca 100644 --- a/router/java/src/net/i2p/router/transport/TransportEventListener.java +++ b/router/java/src/net/i2p/router/transport/TransportEventListener.java @@ -13,6 +13,15 @@ import net.i2p.data.RouterIdentity; import net.i2p.data.i2np.I2NPMessage; public interface TransportEventListener { + + /** + * Message received + * + * @param message non-null + * @param fromRouter may be null + * @param fromRouterHash may be null, calculated from fromRouter if null + */ public void messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash); + public void transportAddressChanged(); } diff --git a/router/java/src/net/i2p/router/transport/TransportImpl.java b/router/java/src/net/i2p/router/transport/TransportImpl.java index a9e71d918e..8464b1d249 100644 --- a/router/java/src/net/i2p/router/transport/TransportImpl.java +++ b/router/java/src/net/i2p/router/transport/TransportImpl.java @@ -397,6 +397,9 @@ public abstract class TransportImpl implements Transport { /** * Message received from the I2NPMessageReader - send it to the listener * + * @param inMsg non-null + * @param remoteIdent may be null + * @param remoteIdentHash may be null, calculated from remoteIdent if null */ public void messageReceived(I2NPMessage inMsg, RouterIdentity remoteIdent, Hash remoteIdentHash, long msToReceive, int bytesReceived) { //if (true) diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java index 0915359110..acd9bf0cd6 100644 --- a/router/java/src/net/i2p/router/transport/TransportManager.java +++ b/router/java/src/net/i2p/router/transport/TransportManager.java @@ -460,6 +460,13 @@ public class TransportManager implements TransportEventListener { return rv; } + /** + * Message received + * + * @param message non-null + * @param fromRouter may be null + * @param fromRouterHash may be null, calculated from fromRouter if null + */ public void messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) { if (_log.shouldLog(Log.DEBUG)) _log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?")); -- GitLab