public class DummyTunnelManagerFacade extends Object implements TunnelManagerFacade
Constructor and Description |
---|
DummyTunnelManagerFacade() |
Modifier and Type | Method and Description |
---|---|
boolean |
addAlias(Destination dest,
ClientTunnelSettings settings,
Destination existingClient)
Add another destination to the same tunnels.
|
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.
|
void |
fail(Hash peer) |
int |
getFreeTunnelCount()
how many free inbound tunnels do we have available?
|
int |
getInboundBuildQueueSize()
count how many inbound tunnel requests we have received but not yet processed
|
Map<Hash,TunnelPool> |
getInboundClientPools()
for TunnelRenderer in router console
|
int |
getInboundClientTunnelCount()
how many free inbound client tunnels do we have available?
|
TunnelPool |
getInboundExploratoryPool()
for TunnelRenderer in router console
|
TunnelPoolSettings |
getInboundSettings() |
TunnelPoolSettings |
getInboundSettings(Hash client) |
long |
getLastParticipatingExpiration()
When does the last tunnel we are participating in expire?
|
Map<Hash,TunnelPool> |
getOutboundClientPools()
for TunnelRenderer in router console
|
int |
getOutboundClientTunnelCount()
how many outbound client tunnels do we have available?
|
int |
getOutboundClientTunnelCount(Hash destination)
how many outbound client tunnels in this pool?
|
TunnelPool |
getOutboundExploratoryPool()
for TunnelRenderer in router console
|
TunnelPoolSettings |
getOutboundSettings() |
TunnelPoolSettings |
getOutboundSettings(Hash client) |
int |
getOutboundTunnelCount()
how many outbound tunnels do we have available?
|
int |
getParticipatingCount()
how many tunnels are we participating in?
|
double |
getShareRatio() |
TunnelInfo |
getTunnelInfo(TunnelId id)
Deprecated.
unused
|
boolean |
isValidTunnel(Hash client,
TunnelInfo tunnel)
Is a tunnel a valid member of the pool?
|
void |
listPools(List<TunnelPool> out)
for TunnelRenderer in router console
|
void |
removeAlias(Destination dest)
Remove another destination to the same tunnels.
|
void |
renderStatusHTML(Writer out) |
void |
restart()
Perform a soft restart.
|
TunnelInfo |
selectInboundExploratoryTunnel(Hash closestTo)
Pick the inbound exploratory tunnel with the gateway closest to the given hash.
|
TunnelInfo |
selectInboundTunnel()
Pick a random inbound exploratory tunnel
|
TunnelInfo |
selectInboundTunnel(Hash destination)
Pick a random inbound tunnel from the given destination's pool
|
TunnelInfo |
selectInboundTunnel(Hash destination,
Hash closestTo)
Pick the inbound tunnel with the gateway closest to the given hash
from the given destination's pool.
|
TunnelInfo |
selectOutboundExploratoryTunnel(Hash closestTo)
Pick the outbound exploratory tunnel with the endpoint closest to the given hash.
|
TunnelInfo |
selectOutboundTunnel()
Pick a random outbound exploratory tunnel
|
TunnelInfo |
selectOutboundTunnel(Hash destination)
Pick a random outbound tunnel from the given destination's pool
|
TunnelInfo |
selectOutboundTunnel(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() |
void |
setInboundSettings(Hash client,
TunnelPoolSettings settings) |
void |
setInboundSettings(TunnelPoolSettings settings) |
void |
setOutboundSettings(Hash client,
TunnelPoolSettings settings) |
void |
setOutboundSettings(TunnelPoolSettings settings) |
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.
|
@Deprecated public TunnelInfo getTunnelInfo(TunnelId id)
TunnelManagerFacade
getTunnelInfo
in interface TunnelManagerFacade
id
- the tunnelId as seen at the gatewaypublic TunnelInfo selectInboundTunnel()
TunnelManagerFacade
selectInboundTunnel
in interface TunnelManagerFacade
public TunnelInfo selectInboundTunnel(Hash destination)
TunnelManagerFacade
selectInboundTunnel
in interface TunnelManagerFacade
destination
- if null, returns inbound exploratory tunnelpublic TunnelInfo selectOutboundTunnel()
TunnelManagerFacade
selectOutboundTunnel
in interface TunnelManagerFacade
public TunnelInfo selectOutboundTunnel(Hash destination)
TunnelManagerFacade
selectOutboundTunnel
in interface TunnelManagerFacade
destination
- if null, returns outbound exploratory tunnelpublic TunnelInfo selectInboundExploratoryTunnel(Hash closestTo)
TunnelManagerFacade
selectInboundExploratoryTunnel
in interface TunnelManagerFacade
closestTo
- non-nullpublic TunnelInfo selectInboundTunnel(Hash destination, Hash closestTo)
TunnelManagerFacade
selectInboundTunnel
in interface TunnelManagerFacade
destination
- if null, returns inbound exploratory tunnelclosestTo
- non-nullpublic TunnelInfo selectOutboundExploratoryTunnel(Hash closestTo)
TunnelManagerFacade
selectOutboundExploratoryTunnel
in interface TunnelManagerFacade
closestTo
- non-nullpublic TunnelInfo selectOutboundTunnel(Hash destination, Hash closestTo)
TunnelManagerFacade
selectOutboundTunnel
in interface TunnelManagerFacade
destination
- if null, returns outbound exploratory tunnelclosestTo
- non-nullpublic boolean isValidTunnel(Hash client, TunnelInfo tunnel)
TunnelManagerFacade
isValidTunnel
in interface TunnelManagerFacade
public int getParticipatingCount()
TunnelManagerFacade
getParticipatingCount
in interface TunnelManagerFacade
public int getFreeTunnelCount()
TunnelManagerFacade
getFreeTunnelCount
in interface TunnelManagerFacade
public int getOutboundTunnelCount()
TunnelManagerFacade
getOutboundTunnelCount
in interface TunnelManagerFacade
public int getInboundClientTunnelCount()
TunnelManagerFacade
getInboundClientTunnelCount
in interface TunnelManagerFacade
public double getShareRatio()
getShareRatio
in interface TunnelManagerFacade
public int getOutboundClientTunnelCount()
TunnelManagerFacade
getOutboundClientTunnelCount
in interface TunnelManagerFacade
public int getOutboundClientTunnelCount(Hash destination)
TunnelManagerFacade
getOutboundClientTunnelCount
in interface TunnelManagerFacade
public long getLastParticipatingExpiration()
TunnelManagerFacade
getLastParticipatingExpiration
in interface TunnelManagerFacade
public void buildTunnels(Destination client, ClientTunnelSettings settings)
TunnelManagerFacade
buildTunnels
in interface TunnelManagerFacade
public boolean addAlias(Destination dest, ClientTunnelSettings settings, Destination existingClient)
TunnelManagerFacade
addAlias
in interface TunnelManagerFacade
public void removeAlias(Destination dest)
TunnelManagerFacade
removeAlias
in interface TunnelManagerFacade
public TunnelPoolSettings getInboundSettings()
getInboundSettings
in interface TunnelManagerFacade
public TunnelPoolSettings getOutboundSettings()
getOutboundSettings
in interface TunnelManagerFacade
public TunnelPoolSettings getInboundSettings(Hash client)
getInboundSettings
in interface TunnelManagerFacade
public TunnelPoolSettings getOutboundSettings(Hash client)
getOutboundSettings
in interface TunnelManagerFacade
public void setInboundSettings(TunnelPoolSettings settings)
setInboundSettings
in interface TunnelManagerFacade
public void setOutboundSettings(TunnelPoolSettings settings)
setOutboundSettings
in interface TunnelManagerFacade
public void setInboundSettings(Hash client, TunnelPoolSettings settings)
setInboundSettings
in interface TunnelManagerFacade
public void setOutboundSettings(Hash client, TunnelPoolSettings settings)
setOutboundSettings
in interface TunnelManagerFacade
public int getInboundBuildQueueSize()
TunnelManagerFacade
getInboundBuildQueueSize
in interface TunnelManagerFacade
public Set<Hash> selectPeersInTooManyTunnels()
selectPeersInTooManyTunnels
in interface TunnelManagerFacade
public void renderStatusHTML(Writer out) throws IOException
renderStatusHTML
in interface Service
IOException
public void restart()
Service
public void shutdown()
Service
public void startup()
Service
public void listPools(List<TunnelPool> out)
TunnelManagerFacade
listPools
in interface TunnelManagerFacade
public Map<Hash,TunnelPool> getInboundClientPools()
TunnelManagerFacade
getInboundClientPools
in interface TunnelManagerFacade
public Map<Hash,TunnelPool> getOutboundClientPools()
TunnelManagerFacade
getOutboundClientPools
in interface TunnelManagerFacade
public TunnelPool getInboundExploratoryPool()
TunnelManagerFacade
getInboundExploratoryPool
in interface TunnelManagerFacade
public TunnelPool getOutboundExploratoryPool()
TunnelManagerFacade
getOutboundExploratoryPool
in interface TunnelManagerFacade
public void fail(Hash peer)
fail
in interface TunnelManagerFacade