Package net.i2p.router
Interface TunnelManagerFacade
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
DummyTunnelManagerFacade,TunnelPoolManager
public interface TunnelManagerFacade extends Service
Build and maintain tunnels throughout the network.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleanaddAlias(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.voidfail(Hash peer)intgetFreeTunnelCount()how many free inbound tunnels do we have available?intgetInboundBuildQueueSize()count how many inbound tunnel requests we have received but not yet processedMap<Hash,TunnelPool>getInboundClientPools()for TunnelRenderer in router consoleintgetInboundClientTunnelCount()how many free inbound client tunnels do we have available?TunnelPoolgetInboundExploratoryPool()for TunnelRenderer in router consoleTunnelPoolgetInboundPool(Hash client)TunnelPoolSettingsgetInboundSettings()TunnelPoolSettingsgetInboundSettings(Hash client)longgetLastParticipatingExpiration()When does the last tunnel we are participating in expire?Map<Hash,TunnelPool>getOutboundClientPools()for TunnelRenderer in router consoleintgetOutboundClientTunnelCount()how many outbound client tunnels do we have available?intgetOutboundClientTunnelCount(Hash destination)how many outbound client tunnels in this pool?TunnelPoolgetOutboundExploratoryPool()for TunnelRenderer in router consoleTunnelPoolgetOutboundPool(Hash client)TunnelPoolSettingsgetOutboundSettings()TunnelPoolSettingsgetOutboundSettings(Hash client)intgetOutboundTunnelCount()how many outbound tunnels do we have available?intgetParticipatingCount()how many tunnels are we participating in?doublegetShareRatio()TunnelInfogetTunnelInfo(TunnelId id)Deprecated.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.TunnelInfoselectInboundExploratoryTunnel(Hash closestTo)Pick the inbound exploratory tunnel with the gateway closest to the given hash.TunnelInfoselectInboundTunnel()Pick a random inbound exploratory tunnelTunnelInfoselectInboundTunnel(Hash destination)Pick a random inbound tunnel from the given destination's poolTunnelInfoselectInboundTunnel(Hash destination, Hash closestTo)Pick the inbound tunnel with the gateway closest to the given hash from the given destination's pool.TunnelInfoselectOutboundExploratoryTunnel(Hash closestTo)Pick the outbound exploratory tunnel with the endpoint closest to the given hash.TunnelInfoselectOutboundTunnel()Pick a random outbound exploratory tunnelTunnelInfoselectOutboundTunnel(Hash destination)Pick a random outbound tunnel from the given destination's poolTunnelInfoselectOutboundTunnel(Hash destination, Hash closestTo)Pick the outbound tunnel with the endpoint closest to the given hash from the given destination's pool.Set<Hash>selectPeersInTooManyTunnels()voidsetInboundSettings(Hash client, TunnelPoolSettings settings)voidsetInboundSettings(TunnelPoolSettings settings)voidsetOutboundSettings(Hash client, TunnelPoolSettings settings)voidsetOutboundSettings(TunnelPoolSettings settings)-
Methods inherited from interface net.i2p.router.Service
renderStatusHTML, restart, shutdown, startup
-
-
-
-
Method Detail
-
getTunnelInfo
@Deprecated TunnelInfo getTunnelInfo(TunnelId id)
Deprecated.unusedRetrieve the information related to a particular tunnel- Parameters:
id- the tunnelId as seen at the gateway
-
selectInboundTunnel
TunnelInfo selectInboundTunnel()
Pick a random inbound exploratory tunnel- Returns:
- null if none
-
selectInboundTunnel
TunnelInfo selectInboundTunnel(Hash destination)
Pick a random inbound tunnel from the given destination's pool- Parameters:
destination- if null, returns inbound exploratory tunnel- Returns:
- null if none
-
selectOutboundTunnel
TunnelInfo selectOutboundTunnel()
Pick a random outbound exploratory tunnel- Returns:
- null if none
-
selectOutboundTunnel
TunnelInfo selectOutboundTunnel(Hash destination)
Pick a random outbound tunnel from the given destination's pool- Parameters:
destination- if null, returns outbound exploratory tunnel- Returns:
- null if none
-
selectInboundExploratoryTunnel
TunnelInfo selectInboundExploratoryTunnel(Hash closestTo)
Pick 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.- Parameters:
closestTo- non-null- Returns:
- null if none
- Since:
- 0.8.10
-
selectInboundTunnel
TunnelInfo selectInboundTunnel(Hash destination, Hash closestTo)
Pick 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.- Parameters:
destination- if null, returns inbound exploratory tunnelclosestTo- non-null- Returns:
- null if none
- Since:
- 0.8.10
-
selectOutboundExploratoryTunnel
TunnelInfo selectOutboundExploratoryTunnel(Hash closestTo)
Pick 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.- Parameters:
closestTo- non-null- Returns:
- null if none
- Since:
- 0.8.10
-
selectOutboundTunnel
TunnelInfo selectOutboundTunnel(Hash destination, Hash closestTo)
Pick 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.- Parameters:
destination- if null, returns outbound exploratory tunnelclosestTo- non-null- Returns:
- null if none
- Since:
- 0.8.10
-
isValidTunnel
boolean isValidTunnel(Hash client, TunnelInfo tunnel)
Is a tunnel a valid member of the pool?
-
getParticipatingCount
int getParticipatingCount()
how many tunnels are we participating in?
-
getFreeTunnelCount
int getFreeTunnelCount()
how many free inbound tunnels do we have available?
-
getOutboundTunnelCount
int getOutboundTunnelCount()
how many outbound tunnels do we have available?
-
getInboundClientTunnelCount
int getInboundClientTunnelCount()
how many free inbound client tunnels do we have available?
-
getOutboundClientTunnelCount
int getOutboundClientTunnelCount()
how many outbound client tunnels do we have available?
-
getOutboundClientTunnelCount
int getOutboundClientTunnelCount(Hash destination)
how many outbound client tunnels in this pool?
-
getShareRatio
double getShareRatio()
-
getLastParticipatingExpiration
long getLastParticipatingExpiration()
When does the last tunnel we are participating in expire?
-
getInboundBuildQueueSize
int getInboundBuildQueueSize()
count how many inbound tunnel requests we have received but not yet processed
-
selectPeersInTooManyTunnels
Set<Hash> selectPeersInTooManyTunnels()
- Returns:
- Set of peers that should not be allowed to be in another tunnel
-
buildTunnels
void buildTunnels(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.
-
removeTunnels
void removeTunnels(Destination client)
Must be called AFTER deregistration by the client manager.- Since:
- 0.9.48
-
addAlias
boolean addAlias(Destination dest, ClientTunnelSettings settings, Destination existingClient)
Add another destination to the same tunnels. Must have same encryption key and a different signing key.- Returns:
- success
- Throws:
IllegalArgumentException- if not- Since:
- 0.9.21
-
removeAlias
void removeAlias(Destination dest)
Remove another destination to the same tunnels.- Since:
- 0.9.21
-
getInboundSettings
TunnelPoolSettings getInboundSettings()
-
getOutboundSettings
TunnelPoolSettings getOutboundSettings()
-
getInboundSettings
TunnelPoolSettings getInboundSettings(Hash client)
-
getOutboundSettings
TunnelPoolSettings getOutboundSettings(Hash client)
-
setInboundSettings
void setInboundSettings(TunnelPoolSettings settings)
-
setOutboundSettings
void setOutboundSettings(TunnelPoolSettings settings)
-
setInboundSettings
void setInboundSettings(Hash client, TunnelPoolSettings settings)
-
setOutboundSettings
void setOutboundSettings(Hash client, TunnelPoolSettings settings)
-
listPools
void listPools(List<TunnelPool> out)
for TunnelRenderer in router console
-
getInboundClientPools
Map<Hash,TunnelPool> getInboundClientPools()
for TunnelRenderer in router console
-
getOutboundClientPools
Map<Hash,TunnelPool> getOutboundClientPools()
for TunnelRenderer in router console
-
getInboundExploratoryPool
TunnelPool getInboundExploratoryPool()
for TunnelRenderer in router console
-
getOutboundExploratoryPool
TunnelPool getOutboundExploratoryPool()
for TunnelRenderer in router console
-
getInboundPool
TunnelPool getInboundPool(Hash client)
- Returns:
- pool or null
- Since:
- 0.9.34
-
getOutboundPool
TunnelPool getOutboundPool(Hash client)
- Returns:
- pool or null
- Since:
- 0.9.34
-
fail
void fail(Hash peer)
- Since:
- 0.8.13
-
-