net.i2p.router.transport
Interface Transport
- All Known Implementing Classes:
- NTCPTransport, TransportImpl, UDPTransport
public interface Transport
Defines a way to send a message to another peer and start listening for messages
Method Summary |
TransportBid |
bid(RouterInfo toAddress,
long dataSize)
|
int |
countActivePeers()
|
int |
countActiveSendPeers()
|
int |
countPeers()
|
void |
externalAddressReceived(java.lang.String source,
byte[] ip,
int port)
|
void |
forwardPortStatus(int port,
boolean success,
java.lang.String reason)
|
java.util.Vector |
getClockSkews()
|
RouterAddress |
getCurrentAddress()
|
java.util.List |
getMostRecentErrorMessages()
|
short |
getReachabilityStatus()
|
int |
getRequestedPort()
|
java.lang.String |
getStyle()
|
boolean |
haveCapacity()
|
boolean |
haveCapacity(int pct)
|
boolean |
isBacklogged(Hash dest)
|
boolean |
isEstablished(Hash peer)
|
boolean |
isUnreachable(Hash peer)
|
void |
recheckReachability()
|
void |
renderStatusHTML(java.io.Writer out,
java.lang.String urlBase,
int sortFlags)
|
void |
send(OutNetMessage msg)
Asynchronously send the message as requested in the message and, if the
send is successful, queue up any msg.getOnSendJob job, and register it
with the OutboundMessageRegistry (if it has a reply selector). |
void |
setListener(TransportEventListener listener)
|
RouterAddress |
startListening()
|
void |
stopListening()
|
boolean |
wasUnreachable(Hash dest)
|
SOURCE_UPNP
static final java.lang.String SOURCE_UPNP
- See Also:
- Constant Field Values
SOURCE_INTERFACE
static final java.lang.String SOURCE_INTERFACE
- See Also:
- Constant Field Values
SOURCE_CONFIG
static final java.lang.String SOURCE_CONFIG
- See Also:
- Constant Field Values
bid
TransportBid bid(RouterInfo toAddress,
long dataSize)
send
void send(OutNetMessage msg)
- Asynchronously send the message as requested in the message and, if the
send is successful, queue up any msg.getOnSendJob job, and register it
with the OutboundMessageRegistry (if it has a reply selector). If the
send fails, queue up any msg.getOnFailedSendJob
startListening
RouterAddress startListening()
stopListening
void stopListening()
getCurrentAddress
RouterAddress getCurrentAddress()
externalAddressReceived
void externalAddressReceived(java.lang.String source,
byte[] ip,
int port)
forwardPortStatus
void forwardPortStatus(int port,
boolean success,
java.lang.String reason)
getRequestedPort
int getRequestedPort()
setListener
void setListener(TransportEventListener listener)
getStyle
java.lang.String getStyle()
countPeers
int countPeers()
countActivePeers
int countActivePeers()
countActiveSendPeers
int countActiveSendPeers()
haveCapacity
boolean haveCapacity()
haveCapacity
boolean haveCapacity(int pct)
getClockSkews
java.util.Vector getClockSkews()
getMostRecentErrorMessages
java.util.List getMostRecentErrorMessages()
renderStatusHTML
void renderStatusHTML(java.io.Writer out,
java.lang.String urlBase,
int sortFlags)
throws java.io.IOException
- Throws:
java.io.IOException
getReachabilityStatus
short getReachabilityStatus()
recheckReachability
void recheckReachability()
isBacklogged
boolean isBacklogged(Hash dest)
wasUnreachable
boolean wasUnreachable(Hash dest)
isUnreachable
boolean isUnreachable(Hash peer)
isEstablished
boolean isEstablished(Hash peer)