Package net.i2p.router.dummy
Class DummyTunnelManagerFacade
java.lang.Object
net.i2p.router.dummy.DummyTunnelManagerFacade
- All Implemented Interfaces:
Service,TunnelManagerFacade
Build and maintain tunnels throughout the network.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAlias(Destination dest, ClientTunnelSettings settings, Destination existingClient) Add another destination to the same tunnels.voidbuildTunnels(Destination client, ClientTunnelSettings settings) the client connected (or updated their settings), so make sure we have the tunnels for them, and whenever necessary, ask them to authorize leases.voidinthow many free inbound tunnels do we have available?intcount how many inbound tunnel requests we have received but not yet processedfor TunnelRenderer in router consoleinthow many free inbound client tunnels do we have available?for TunnelRenderer in router consolegetInboundPool(Hash client) getInboundSettings(Hash client) longWhen does the last tunnel we are participating in expire?for TunnelRenderer in router consoleinthow many outbound client tunnels do we have available?intgetOutboundClientTunnelCount(Hash destination) how many outbound client tunnels in this pool?for TunnelRenderer in router consolegetOutboundPool(Hash client) getOutboundSettings(Hash client) inthow many outbound tunnels do we have available?inthow many tunnels are we participating in?doubleDeprecated.unusedbooleanisValidTunnel(Hash client, TunnelInfo tunnel) Is a tunnel a valid member of the pool?voidlistPools(List<TunnelPool> out) for TunnelRenderer in router consolevoidremoveAlias(Destination dest) Remove another destination to the same tunnels.voidremoveTunnels(Destination client) Must be called AFTER deregistration by the client manager.voidrenderStatusHTML(Writer out) voidrestart()Perform a soft restart.selectInboundExploratoryTunnel(Hash closestTo) Pick the inbound exploratory tunnel with the gateway closest to the given hash.Pick a random inbound exploratory tunnelselectInboundTunnel(Hash destination) Pick a random inbound tunnel from the given destination's poolselectInboundTunnel(Hash destination, Hash closestTo) Pick the inbound tunnel with the gateway closest to the given hash from the given destination's pool.selectOutboundExploratoryTunnel(Hash closestTo) Pick the outbound exploratory tunnel with the endpoint closest to the given hash.Pick a random outbound exploratory tunnelselectOutboundTunnel(Hash destination) Pick a random outbound tunnel from the given destination's poolselectOutboundTunnel(Hash destination, Hash closestTo) Pick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool.voidsetInboundSettings(Hash client, TunnelPoolSettings settings) voidsetInboundSettings(TunnelPoolSettings settings) voidsetOutboundSettings(Hash client, TunnelPoolSettings settings) voidsetOutboundSettings(TunnelPoolSettings settings) voidshutdown()Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.voidstartup()Instruct the service that it should start normal operation.
-
Constructor Details
-
DummyTunnelManagerFacade
public DummyTunnelManagerFacade()
-
-
Method Details
-
getTunnelInfo
Deprecated.unusedDescription copied from interface:TunnelManagerFacadeRetrieve the information related to a particular tunnel- Specified by:
getTunnelInfoin interfaceTunnelManagerFacade- Parameters:
id- the tunnelId as seen at the gateway
-
selectInboundTunnel
Description copied from interface:TunnelManagerFacadePick a random inbound exploratory tunnel- Specified by:
selectInboundTunnelin interfaceTunnelManagerFacade- Returns:
- null if none
-
selectInboundTunnel
Description copied from interface:TunnelManagerFacadePick a random inbound tunnel from the given destination's pool- Specified by:
selectInboundTunnelin interfaceTunnelManagerFacade- Parameters:
destination- if null, returns inbound exploratory tunnel- Returns:
- null if none
-
selectOutboundTunnel
Description copied from interface:TunnelManagerFacadePick a random outbound exploratory tunnel- Specified by:
selectOutboundTunnelin interfaceTunnelManagerFacade- Returns:
- null if none
-
selectOutboundTunnel
Description copied from interface:TunnelManagerFacadePick a random outbound tunnel from the given destination's pool- Specified by:
selectOutboundTunnelin interfaceTunnelManagerFacade- Parameters:
destination- if null, returns outbound exploratory tunnel- Returns:
- null if none
-
selectInboundExploratoryTunnel
Description copied from interface:TunnelManagerFacadePick the inbound exploratory tunnel with the gateway closest to the given hash. By using this instead of the random selectTunnel(), we force some locality in OBEP-IBGW connections to minimize those connections network-wide.- Specified by:
selectInboundExploratoryTunnelin interfaceTunnelManagerFacade- Parameters:
closestTo- non-null- Returns:
- null if none
-
selectInboundTunnel
Description copied from interface:TunnelManagerFacadePick the inbound tunnel with the gateway closest to the given hash from the given destination's pool. By using this instead of the random selectTunnel(), we force some locality in OBEP-IBGW connections to minimize those connections network-wide.- Specified by:
selectInboundTunnelin interfaceTunnelManagerFacade- Parameters:
destination- if null, returns inbound exploratory tunnelclosestTo- non-null- Returns:
- null if none
-
selectOutboundExploratoryTunnel
Description copied from interface:TunnelManagerFacadePick the outbound exploratory tunnel with the endpoint closest to the given hash. By using this instead of the random selectTunnel(), we force some locality in OBEP-IBGW connections to minimize those connections network-wide.- Specified by:
selectOutboundExploratoryTunnelin interfaceTunnelManagerFacade- Parameters:
closestTo- non-null- Returns:
- null if none
-
selectOutboundTunnel
Description copied from interface:TunnelManagerFacadePick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool. By using this instead of the random selectTunnel(), we force some locality in OBEP-IBGW connections to minimize those connections network-wide.- Specified by:
selectOutboundTunnelin interfaceTunnelManagerFacade- Parameters:
destination- if null, returns outbound exploratory tunnelclosestTo- non-null- Returns:
- null if none
-
isValidTunnel
Description copied from interface:TunnelManagerFacadeIs a tunnel a valid member of the pool?- Specified by:
isValidTunnelin interfaceTunnelManagerFacade
-
getParticipatingCount
public int getParticipatingCount()Description copied from interface:TunnelManagerFacadehow many tunnels are we participating in?- Specified by:
getParticipatingCountin interfaceTunnelManagerFacade
-
getFreeTunnelCount
public int getFreeTunnelCount()Description copied from interface:TunnelManagerFacadehow many free inbound tunnels do we have available?- Specified by:
getFreeTunnelCountin interfaceTunnelManagerFacade
-
getOutboundTunnelCount
public int getOutboundTunnelCount()Description copied from interface:TunnelManagerFacadehow many outbound tunnels do we have available?- Specified by:
getOutboundTunnelCountin interfaceTunnelManagerFacade
-
getInboundClientTunnelCount
public int getInboundClientTunnelCount()Description copied from interface:TunnelManagerFacadehow many free inbound client tunnels do we have available?- Specified by:
getInboundClientTunnelCountin interfaceTunnelManagerFacade
-
getOutboundClientTunnelCount
public int getOutboundClientTunnelCount()Description copied from interface:TunnelManagerFacadehow many outbound client tunnels do we have available?- Specified by:
getOutboundClientTunnelCountin interfaceTunnelManagerFacade
-
getOutboundClientTunnelCount
Description copied from interface:TunnelManagerFacadehow many outbound client tunnels in this pool?- Specified by:
getOutboundClientTunnelCountin interfaceTunnelManagerFacade
-
getLastParticipatingExpiration
public long getLastParticipatingExpiration()Description copied from interface:TunnelManagerFacadeWhen does the last tunnel we are participating in expire?- Specified by:
getLastParticipatingExpirationin interfaceTunnelManagerFacade
-
buildTunnels
Description copied from interface:TunnelManagerFacadethe client connected (or updated their settings), so make sure we have the tunnels for them, and whenever necessary, ask them to authorize leases.- Specified by:
buildTunnelsin interfaceTunnelManagerFacade
-
removeTunnels
Description copied from interface:TunnelManagerFacadeMust be called AFTER deregistration by the client manager.- Specified by:
removeTunnelsin interfaceTunnelManagerFacade
-
addAlias
public boolean addAlias(Destination dest, ClientTunnelSettings settings, Destination existingClient) Description copied from interface:TunnelManagerFacadeAdd another destination to the same tunnels. Must have same encryption key and a different signing key.- Specified by:
addAliasin interfaceTunnelManagerFacade- Returns:
- success
-
removeAlias
Description copied from interface:TunnelManagerFacadeRemove another destination to the same tunnels.- Specified by:
removeAliasin interfaceTunnelManagerFacade
-
getInboundSettings
- Specified by:
getInboundSettingsin interfaceTunnelManagerFacade
-
getOutboundSettings
- Specified by:
getOutboundSettingsin interfaceTunnelManagerFacade
-
getInboundSettings
- Specified by:
getInboundSettingsin interfaceTunnelManagerFacade
-
getOutboundSettings
- Specified by:
getOutboundSettingsin interfaceTunnelManagerFacade
-
setInboundSettings
- Specified by:
setInboundSettingsin interfaceTunnelManagerFacade
-
setOutboundSettings
- Specified by:
setOutboundSettingsin interfaceTunnelManagerFacade
-
setInboundSettings
- Specified by:
setInboundSettingsin interfaceTunnelManagerFacade
-
setOutboundSettings
- Specified by:
setOutboundSettingsin interfaceTunnelManagerFacade
-
getInboundBuildQueueSize
public int getInboundBuildQueueSize()Description copied from interface:TunnelManagerFacadecount how many inbound tunnel requests we have received but not yet processed- Specified by:
getInboundBuildQueueSizein interfaceTunnelManagerFacade
-
selectPeersInTooManyTunnels
- Specified by:
selectPeersInTooManyTunnelsin interfaceTunnelManagerFacade- Returns:
- Set of peers that should not be allowed to be in another tunnel
-
renderStatusHTML
- Specified by:
renderStatusHTMLin interfaceService- Throws:
IOException
-
restart
public void restart()Description copied from interface:ServicePerform a soft restart. -
shutdown
public void shutdown()Description copied from interface:ServiceInstruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. It should not depend on other components at this point. This call DOES block. -
startup
public void startup()Description copied from interface:ServiceInstruct the service that it should start normal operation. This call DOES block until the service is ready. -
listPools
Description copied from interface:TunnelManagerFacadefor TunnelRenderer in router console- Specified by:
listPoolsin interfaceTunnelManagerFacade
-
getInboundClientPools
Description copied from interface:TunnelManagerFacadefor TunnelRenderer in router console- Specified by:
getInboundClientPoolsin interfaceTunnelManagerFacade
-
getOutboundClientPools
Description copied from interface:TunnelManagerFacadefor TunnelRenderer in router console- Specified by:
getOutboundClientPoolsin interfaceTunnelManagerFacade
-
getInboundExploratoryPool
Description copied from interface:TunnelManagerFacadefor TunnelRenderer in router console- Specified by:
getInboundExploratoryPoolin interfaceTunnelManagerFacade
-
getOutboundExploratoryPool
Description copied from interface:TunnelManagerFacadefor TunnelRenderer in router console- Specified by:
getOutboundExploratoryPoolin interfaceTunnelManagerFacade
-
fail
- Specified by:
failin interfaceTunnelManagerFacade
-
getInboundPool
- Specified by:
getInboundPoolin interfaceTunnelManagerFacade- Returns:
- pool or null
-
getOutboundPool
- Specified by:
getOutboundPoolin interfaceTunnelManagerFacade- Returns:
- pool or null
-