I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a9eb48c4 authored by zzz's avatar zzz
Browse files

javadoc

parent 8afe7c26
No related branches found
No related tags found
No related merge requests found
......@@ -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)
*/
......
......@@ -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))
......
......@@ -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();
}
......@@ -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)
......
......@@ -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?"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment