|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.tunnel.TunnelDispatcher
public class TunnelDispatcher
Handle the actual processing and forwarding of messages through the various tunnels.
Constructor Summary | |
---|---|
TunnelDispatcher(RouterContext ctx)
Creates a new instance of TunnelDispatcher |
Method Summary | |
---|---|
void |
dispatch(TunnelDataMessage msg,
Hash recvFrom)
We are participating in a tunnel (perhaps we're even the endpoint), so take the message and do what it says. |
void |
dispatch(TunnelGatewayMessage msg)
We are the inbound tunnel gateway, so encrypt it as necessary and forward it on. |
void |
dispatchOutbound(I2NPMessage msg,
TunnelId outboundTunnel,
Hash targetPeer)
We are the outbound tunnel gateway (we created it), so wrap up this message with instructions to be forwarded to the targetPeer when it reaches the endpoint. |
void |
dispatchOutbound(I2NPMessage msg,
TunnelId outboundTunnel,
TunnelId targetTunnel,
Hash targetPeer)
We are the outbound tunnel gateway (we created it), so wrap up this message with instructions to be forwarded to the targetTunnel on the targetPeer when it reaches the endpoint. |
void |
dropBiggestParticipating()
If a router is too overloaded to build its own tunnels, the build executor may call this. |
long |
getLastParticipatingExpiration()
what is the date/time on which the last non-locally-created tunnel expires? |
int |
getParticipatingCount()
|
void |
joinInbound(TunnelCreatorConfig cfg)
We are the inbound endpoint - we created this tunnel |
void |
joinInboundGateway(HopConfig cfg)
We are the inbound gateway in this tunnel, and did not create it |
void |
joinOutbound(TunnelCreatorConfig cfg)
We are the outbound gateway - we created this tunnel |
void |
joinOutboundEndpoint(HopConfig cfg)
We are the outbound endpoint in this tunnel, and did not create it |
void |
joinParticipant(HopConfig cfg)
We are a participant in this tunnel, but not as the endpoint or gateway |
java.util.List |
listParticipatingTunnels()
|
void |
remove(HopConfig cfg)
No longer participate in the tunnel that someone asked us to be a member of |
void |
remove(TunnelCreatorConfig cfg)
We no longer want to participate in this tunnel that we created |
void |
renderStatusHTML(java.io.Writer out)
|
void |
restart()
Perform a soft restart. |
void |
shutdown()
Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. |
void |
startup()
Instruct the service that it should start normal operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TunnelDispatcher(RouterContext ctx)
Method Detail |
---|
public void joinOutbound(TunnelCreatorConfig cfg)
public void joinInbound(TunnelCreatorConfig cfg)
public void joinParticipant(HopConfig cfg)
public void joinOutboundEndpoint(HopConfig cfg)
public void joinInboundGateway(HopConfig cfg)
public int getParticipatingCount()
public long getLastParticipatingExpiration()
public void remove(TunnelCreatorConfig cfg)
public void remove(HopConfig cfg)
public void dispatch(TunnelDataMessage msg, Hash recvFrom)
public void dispatch(TunnelGatewayMessage msg)
public void dispatchOutbound(I2NPMessage msg, TunnelId outboundTunnel, Hash targetPeer)
msg
- raw message to deliver to the target peeroutboundTunnel
- tunnel to send the message outtargetPeer
- peer to receive the messagepublic void dispatchOutbound(I2NPMessage msg, TunnelId outboundTunnel, TunnelId targetTunnel, Hash targetPeer)
msg
- raw message to deliver to the targetTunnel on the targetPeeroutboundTunnel
- tunnel to send the message outtargetTunnel
- tunnel on the targetPeer to deliver the message totargetPeer
- gateway to the tunnel to receive the messagepublic java.util.List listParticipatingTunnels()
public void dropBiggestParticipating()
public void startup()
Service
startup
in interface Service
public void shutdown()
Service
shutdown
in interface Service
public void restart()
Service
restart
in interface Service
public void renderStatusHTML(java.io.Writer out) throws java.io.IOException
renderStatusHTML
in interface Service
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |