forked from I2P_Developers/i2p.i2p
javadoc
This commit is contained in:
@ -116,6 +116,10 @@ public class InNetMessagePool implements Service {
|
|||||||
* into a job created by that builder and queued up for processing instead
|
* 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)
|
* (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
|
* @return -1 for some types of errors but not all; 0 otherwise
|
||||||
* (was queue length, long ago)
|
* (was queue length, long ago)
|
||||||
*/
|
*/
|
||||||
|
@ -101,6 +101,9 @@ class RouterThrottleImpl implements RouterThrottle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return 0 for accept or nonzero reject code
|
||||||
|
*/
|
||||||
public int acceptTunnelRequest() {
|
public int acceptTunnelRequest() {
|
||||||
if (_context.getProperty(Router.PROP_SHUTDOWN_IN_PROGRESS) != null) {
|
if (_context.getProperty(Router.PROP_SHUTDOWN_IN_PROGRESS) != null) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
|
@ -13,6 +13,15 @@ import net.i2p.data.RouterIdentity;
|
|||||||
import net.i2p.data.i2np.I2NPMessage;
|
import net.i2p.data.i2np.I2NPMessage;
|
||||||
|
|
||||||
public interface TransportEventListener {
|
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 messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash);
|
||||||
|
|
||||||
public void transportAddressChanged();
|
public void transportAddressChanged();
|
||||||
}
|
}
|
||||||
|
@ -397,6 +397,9 @@ public abstract class TransportImpl implements Transport {
|
|||||||
/**
|
/**
|
||||||
* Message received from the I2NPMessageReader - send it to the listener
|
* 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) {
|
public void messageReceived(I2NPMessage inMsg, RouterIdentity remoteIdent, Hash remoteIdentHash, long msToReceive, int bytesReceived) {
|
||||||
//if (true)
|
//if (true)
|
||||||
|
@ -460,6 +460,13 @@ public class TransportManager implements TransportEventListener {
|
|||||||
return rv;
|
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) {
|
public void messageReceived(I2NPMessage message, RouterIdentity fromRouter, Hash fromRouterHash) {
|
||||||
if (_log.shouldLog(Log.DEBUG))
|
if (_log.shouldLog(Log.DEBUG))
|
||||||
_log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?"));
|
_log.debug("I2NPMessage received: " + message.getClass().getName(), new Exception("Where did I come from again?"));
|
||||||
|
Reference in New Issue
Block a user