net.i2p.router.tunnel
Class TunnelParticipant
java.lang.Object
net.i2p.router.tunnel.TunnelParticipant
public class TunnelParticipant
- extends java.lang.Object
Participate in a tunnel at a location other than the gateway or outbound
endpoint. This participant should be provided with the necessary processor
if it is an inbound tunnel endpoint, and that will enable the
InboundMessageDistributor to receive defragmented and decrypted messages,
which it will then selectively forward.
Method Summary |
void |
dispatch(TunnelDataMessage msg,
Hash recvFrom)
|
int |
getCompleteCount()
private void incrementThroughput(Hash prev) {
if (true) return;
long now = System.currentTimeMillis();
long timeSince = now - _lastCoallesced;
if (timeSince >= 60*1000) {
int amount = 1024 * _periodMessagesTransferred;
int normalized = (int)((double)amount * 60d*1000d / (double)timeSince);
_periodMessagesTransferred = 0;
_lastCoallesced = now;
_context.profileManager().tunnelDataPushed1m(prev, normalized);
} else {
_periodMessagesTransferred++;
}
} |
int |
getFailedCount()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TunnelParticipant
public TunnelParticipant(RouterContext ctx,
HopConfig config,
HopProcessor processor)
TunnelParticipant
public TunnelParticipant(RouterContext ctx,
InboundEndpointProcessor inEndProc)
dispatch
public void dispatch(TunnelDataMessage msg,
Hash recvFrom)
getCompleteCount
public int getCompleteCount()
- private void incrementThroughput(Hash prev) {
if (true) return;
long now = System.currentTimeMillis();
long timeSince = now - _lastCoallesced;
if (timeSince >= 60*1000) {
int amount = 1024 * _periodMessagesTransferred;
int normalized = (int)((double)amount * 60d*1000d / (double)timeSince);
_periodMessagesTransferred = 0;
_lastCoallesced = now;
_context.profileManager().tunnelDataPushed1m(prev, normalized);
} else {
_periodMessagesTransferred++;
}
}
getFailedCount
public int getFailedCount()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object