|
||||||||||
| 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
| Field Summary | |
|---|---|
static String |
PROP_I2NP_NTCP_AUTO_IP
|
static String |
PROP_I2NP_NTCP_AUTO_PORT
|
static String |
PROP_I2NP_NTCP_HOSTNAME
|
static String |
PROP_I2NP_NTCP_PORT
|
| Fields inherited from class net.i2p.router.CommSystemFacade |
|---|
STATUS_DIFFERENT, STATUS_DISCONNECTED, STATUS_HOSED, STATUS_OK, STATUS_REJECT_UNSOLICITED, STATUS_UNKNOWN |
| Constructor Summary | |
|---|---|
CommSystemFacadeImpl(RouterContext context)
|
|
| Method Summary | |
|---|---|
int |
countActivePeers()
|
int |
countActiveSendPeers()
|
Set<RouterAddress> |
createAddresses()
Create the set of RouterAddress structures based on the router's config |
static RouterAddress |
createNTCPAddress(RouterContext ctx)
This only creates an address if the hostname AND port are set in router.config, which should be rare. |
TransportBid |
getBid(OutNetMessage msg)
|
List<TransportBid> |
getBids(OutNetMessage msg)
|
String |
getCountry(Hash peer)
Uses the transport IP first because that lookup is fast, then the SSU IP from the netDb. |
String |
getCountryName(String c)
full name for a country code, or the code if we don't know the name |
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 |
getMostRecentErrorMessages()
|
TransportBid |
getNextBid(OutNetMessage msg)
|
String |
getOurCountry()
|
short |
getReachabilityStatus()
Determine under what conditions we are remotely reachable. |
(package private) int |
getTransportCount()
|
boolean |
haveHighOutboundCapacity()
|
boolean |
haveInboundCapacity(int pct)
|
boolean |
haveOutboundCapacity(int pct)
|
boolean |
isBacklogged(Hash dest)
|
boolean |
isDummy()
|
boolean |
isEstablished(Hash dest)
|
boolean |
isInBadCountry()
Are we in a bad place |
void |
notifyReplaceAddress(RouterAddress UDPAddr)
UDP changed addresses, tell NTCP and restart This should really be moved to ntcp/NTCPTransport.java, why is it here? |
void |
processMessage(OutNetMessage msg)
Send the message out |
void |
queueLookup(byte[] ip)
|
void |
recheckReachability()
|
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. |
void |
startup()
Instruct the service that it should start normal operation. |
boolean |
wasUnreachable(Hash dest)
|
| Methods inherited from class net.i2p.router.CommSystemFacade |
|---|
getMedianPeerClockSkew, renderStatusHTML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_I2NP_NTCP_HOSTNAME
public static final String PROP_I2NP_NTCP_PORT
public static final String PROP_I2NP_NTCP_AUTO_PORT
public static final String PROP_I2NP_NTCP_AUTO_IP
| 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 CommSystemFacadepublic int countActiveSendPeers()
countActiveSendPeers in class CommSystemFacadepublic boolean haveInboundCapacity(int pct)
haveInboundCapacity in class CommSystemFacadepublic boolean haveOutboundCapacity(int pct)
haveOutboundCapacity in class CommSystemFacadepublic boolean haveHighOutboundCapacity()
haveHighOutboundCapacity in class CommSystemFacadepublic long getFramedAveragePeerClockSkew(int percentToInclude)
CommSystemFacade
getFramedAveragePeerClockSkew in class CommSystemFacadepercentToInclude - 1-100
public List<TransportBid> getBids(OutNetMessage msg)
public TransportBid getBid(OutNetMessage msg)
public TransportBid getNextBid(OutNetMessage msg)
int getTransportCount()
public void processMessage(OutNetMessage msg)
processMessage in class CommSystemFacadepublic boolean isBacklogged(Hash dest)
isBacklogged in class CommSystemFacadepublic boolean isEstablished(Hash dest)
isEstablished in class CommSystemFacadepublic boolean wasUnreachable(Hash dest)
wasUnreachable in class CommSystemFacadepublic byte[] getIP(Hash dest)
getIP in class CommSystemFacadepublic List getMostRecentErrorMessages()
getMostRecentErrorMessages in class CommSystemFacadepublic short getReachabilityStatus()
CommSystemFacade
getReachabilityStatus in class CommSystemFacadepublic void recheckReachability()
recheckReachability in class CommSystemFacade
public void renderStatusHTML(Writer out,
String urlBase,
int sortFlags)
throws IOException
renderStatusHTML in class CommSystemFacadeIOExceptionpublic Set<RouterAddress> createAddresses()
CommSystemFacade
createAddresses in class CommSystemFacadepublic static RouterAddress createNTCPAddress(RouterContext ctx)
public void notifyReplaceAddress(RouterAddress UDPAddr)
notifyReplaceAddress in class CommSystemFacadepublic void queueLookup(byte[] ip)
queueLookup in class CommSystemFacadepublic String getOurCountry()
getOurCountry in class CommSystemFacadepublic boolean isInBadCountry()
isInBadCountry in class CommSystemFacadepublic String getCountry(Hash peer)
getCountry in class CommSystemFacadepublic String getCountryName(String c)
getCountryName in class CommSystemFacadepublic String renderPeerHTML(Hash peer)
renderPeerHTML in class CommSystemFacadepublic boolean isDummy()
isDummy in class CommSystemFacade
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||