|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.CommSystemFacade
net.i2p.router.transport.CommSystemFacadeImpl
public class CommSystemFacadeImpl
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.i2p.router.CommSystemFacade |
---|
CommSystemFacade.Status |
Field Summary |
---|
Constructor Summary | |
---|---|
CommSystemFacadeImpl(RouterContext context)
|
Method Summary | |
---|---|
int |
countActivePeers()
How many peers are we currently connected to, that we have sent a message to or received a message from in the last five minutes. |
int |
countActiveSendPeers()
How many peers are we currently connected to, that we have sent a message to in the last minute. |
List<RouterAddress> |
createAddresses()
Create the list of RouterAddress structures based on the router's config |
String |
getCountry(Hash peer)
Uses the transport IP first because that lookup is fast, then the IP from the netDb. |
String |
getCountryName(String c)
full name for a country code, or the code if we don't know the name |
DHSessionKeyBuilder.Factory |
getDHFactory()
Hook for pluggable transport creation. |
long |
getFramedAveragePeerClockSkew(int percentToInclude)
Return framed average clock skew of connected peers in seconds, or null if we cannot answer. |
byte[] |
getIP(Hash dest)
|
List<String> |
getMostRecentErrorMessages()
|
String |
getOurCountry()
|
CommSystemFacade.Status |
getStatus()
Determine under what conditions we are remotely reachable. |
boolean |
haveHighOutboundCapacity()
|
boolean |
haveInboundCapacity(int pct)
|
boolean |
haveOutboundCapacity(int pct)
|
boolean |
isBacklogged(Hash dest)
|
boolean |
isDummy()
Is everything disabled for testing? |
boolean |
isEstablished(Hash dest)
|
boolean |
isInBadCountry()
Are we in a bad place |
boolean |
isInBadCountry(Hash peer)
Are they in a bad place |
boolean |
isInBadCountry(RouterInfo ri)
Are they in a bad place |
void |
notifyRemoveAddress(boolean ipv6)
Tell other transports our address changed |
void |
notifyRemoveAddress(RouterAddress address)
Tell other transports our address changed |
void |
notifyReplaceAddress(RouterAddress udpAddr)
UDP changed addresses, tell NTCP and restart All the work moved to NTCPTransport.externalAddressReceived() |
void |
processMessage(OutNetMessage msg)
Send the message out |
void |
queueLookup(byte[] ip)
|
void |
recheckReachability()
Deprecated. unused |
void |
registerTransport(Transport t)
Pluggable transports. |
String |
renderPeerHTML(Hash peer)
Provide a consistent "look" for displaying router IDs in the console |
void |
renderStatusHTML(Writer out,
String urlBase,
int sortFlags)
|
void |
restart()
Perform a soft restart. |
void |
shutdown()
Cannot be restarted after calling this. |
void |
startup()
Instruct the service that it should start normal operation. |
void |
unregisterTransport(Transport t)
Pluggable transports. |
boolean |
wasUnreachable(Hash dest)
|
Methods inherited from class net.i2p.router.CommSystemFacade |
---|
getMedianPeerClockSkew, getReachabilityStatus, renderStatusHTML |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommSystemFacadeImpl(RouterContext context)
Method Detail |
---|
public void startup()
Service
public void shutdown()
public void restart()
Service
public int countActivePeers()
countActivePeers
in class CommSystemFacade
public int countActiveSendPeers()
countActiveSendPeers
in class CommSystemFacade
public boolean haveInboundCapacity(int pct)
haveInboundCapacity
in class CommSystemFacade
public boolean haveOutboundCapacity(int pct)
haveOutboundCapacity
in class CommSystemFacade
public boolean haveHighOutboundCapacity()
haveHighOutboundCapacity
in class CommSystemFacade
public long getFramedAveragePeerClockSkew(int percentToInclude)
CommSystemFacade
getFramedAveragePeerClockSkew
in class CommSystemFacade
percentToInclude
- 1-100
public void processMessage(OutNetMessage msg)
processMessage
in class CommSystemFacade
public boolean isBacklogged(Hash dest)
isBacklogged
in class CommSystemFacade
public boolean isEstablished(Hash dest)
isEstablished
in class CommSystemFacade
public boolean wasUnreachable(Hash dest)
wasUnreachable
in class CommSystemFacade
public byte[] getIP(Hash dest)
getIP
in class CommSystemFacade
public List<String> getMostRecentErrorMessages()
getMostRecentErrorMessages
in class CommSystemFacade
public CommSystemFacade.Status getStatus()
CommSystemFacade
getStatus
in class CommSystemFacade
public void recheckReachability()
recheckReachability
in class CommSystemFacade
public void renderStatusHTML(Writer out, String urlBase, int sortFlags) throws IOException
renderStatusHTML
in class CommSystemFacade
IOException
public List<RouterAddress> createAddresses()
CommSystemFacade
createAddresses
in class CommSystemFacade
public void notifyReplaceAddress(RouterAddress udpAddr)
notifyReplaceAddress
in class CommSystemFacade
udpAddr
- may be null; or udpAddr's host/IP may be nullpublic void notifyRemoveAddress(RouterAddress address)
notifyRemoveAddress
in class CommSystemFacade
address
- non-null; but address's host/IP may be nullpublic void notifyRemoveAddress(boolean ipv6)
notifyRemoveAddress
in class CommSystemFacade
public void registerTransport(Transport t)
registerTransport
in class CommSystemFacade
public void unregisterTransport(Transport t)
unregisterTransport
in class CommSystemFacade
public DHSessionKeyBuilder.Factory getDHFactory()
getDHFactory
in class CommSystemFacade
public void queueLookup(byte[] ip)
queueLookup
in class CommSystemFacade
public String getOurCountry()
getOurCountry
in class CommSystemFacade
public boolean isInBadCountry()
isInBadCountry
in class CommSystemFacade
public boolean isInBadCountry(Hash peer)
isInBadCountry
in class CommSystemFacade
peer
- non-nullpublic boolean isInBadCountry(RouterInfo ri)
isInBadCountry
in class CommSystemFacade
ri
- non-nullpublic String getCountry(Hash peer)
getCountry
in class CommSystemFacade
peer
- not ourselves - use getOurCountry() for that
public String getCountryName(String c)
getCountryName
in class CommSystemFacade
public String renderPeerHTML(Hash peer)
renderPeerHTML
in class CommSystemFacade
public boolean isDummy()
isDummy
in class CommSystemFacade
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |