Package net.i2p.router
Interface TunnelInfo
-
- All Known Implementing Classes:
PooledTunnelCreatorConfig,TunnelCreatorConfig
public interface TunnelInfoDefines the information associated with a tunnel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HashgetDestination()if this is a client tunnel, what destination is it for?HashgetEndpoint()For conveniencelonggetExpiration()HashgetFarEnd()For convenienceHashgetGateway()For convenienceintgetLength()how many peers are there in the tunnel (including the creator)?HashgetPeer(int hop)retrieve the peer at the given hop.intgetProcessedMessagesCount()TunnelIdgetReceiveTunnelId(int hop)retrieve the tunnelId that the given hop receives messages on.TunnelIdgetSendTunnelId(int hop)retrieve the tunnelId that the given hop sends messages on.longgetVerifiedBytesTransferred()we know for sure that this many bytes travelled through the tunnel in its lifetimevoidincrementVerifiedBytesTransferred(int numBytes)we know for sure that the given number of bytes were sent down the tunnel fullybooleanisInbound()is this an inbound tunnel?voidsetReused()Note that we reused this tunnelvoidtestSuccessful(int responseTime)take note that the tunnel was able to measurably Do Good in the given timebooleanwasReused()Did we reuse this tunnel?
-
-
-
Method Detail
-
getLength
int getLength()
how many peers are there in the tunnel (including the creator)?
-
getReceiveTunnelId
TunnelId getReceiveTunnelId(int hop)
retrieve the tunnelId that the given hop receives messages on. the gateway is hop 0.
-
getSendTunnelId
TunnelId getSendTunnelId(int hop)
retrieve the tunnelId that the given hop sends messages on. the gateway is hop 0.
-
getPeer
Hash getPeer(int hop)
retrieve the peer at the given hop. the gateway is hop 0
-
getGateway
Hash getGateway()
For convenience- Returns:
- getPeer(0)
- Since:
- 0.8.9
-
getEndpoint
Hash getEndpoint()
For convenience- Returns:
- getPeer(getLength() - 1)
- Since:
- 0.8.9
-
getFarEnd
Hash getFarEnd()
For convenience- Returns:
- isInbound() ? getGateway() : getEndpoint()
- Since:
- 0.8.9
-
isInbound
boolean isInbound()
is this an inbound tunnel?
-
getDestination
Hash getDestination()
if this is a client tunnel, what destination is it for?
-
getExpiration
long getExpiration()
-
testSuccessful
void testSuccessful(int responseTime)
take note that the tunnel was able to measurably Do Good in the given time
-
getProcessedMessagesCount
int getProcessedMessagesCount()
-
getVerifiedBytesTransferred
long getVerifiedBytesTransferred()
we know for sure that this many bytes travelled through the tunnel in its lifetime
-
incrementVerifiedBytesTransferred
void incrementVerifiedBytesTransferred(int numBytes)
we know for sure that the given number of bytes were sent down the tunnel fully
-
wasReused
boolean wasReused()
Did we reuse this tunnel?- Since:
- 0.8.11
-
setReused
void setReused()
Note that we reused this tunnel- Since:
- 0.8.11
-
-