Servicepublic class CommSystemFacadeImpl extends CommSystemFacade
CommSystemFacade.StatusSTATUS_DIFFERENT, STATUS_DISCONNECTED, STATUS_HOSED, STATUS_IPV4_DISABLED_IPV6_FIREWALLED, STATUS_IPV4_DISABLED_IPV6_OK, STATUS_IPV4_DISABLED_IPV6_UNKNOWN, STATUS_IPV4_FIREWALLED_IPV6_OK, STATUS_IPV4_FIREWALLED_IPV6_UNKNOWN, STATUS_IPV4_OK_IPV6_FIREWALLED, STATUS_IPV4_OK_IPV6_UNKNOWN, STATUS_IPV4_SNAT_IPV6_OK, STATUS_IPV4_SNAT_IPV6_UNKNOWN, STATUS_IPV4_UNKNOWN_IPV6_FIREWALLED, STATUS_IPV4_UNKNOWN_IPV6_OK, STATUS_OK, STATUS_REJECT_UNSOLICITED, STATUS_UNKNOWN| コンストラクタ | 説明 |
|---|---|
CommSystemFacadeImpl(RouterContext context) |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
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.
|
java.util.List<RouterAddress> |
createAddresses() |
Create the list of RouterAddress structures based on the router's config
|
java.lang.String |
getCountry(Hash peer) |
Uses the transport IP first because that lookup is fast,
then the IP from the netDb.
|
java.lang.String |
getCountryName(java.lang.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.
|
java.util.Set<Hash> |
getEstablished() |
Get all the peers we are connected to.
|
long |
getFramedAveragePeerClockSkew(int percentToInclude) |
Return framed average clock skew of connected peers in seconds, or null if we cannot answer.
|
byte[] |
getIP(Hash peer) |
|
java.util.List<java.lang.String> |
getMostRecentErrorMessages() |
|
java.lang.String |
getOurCountry() |
|
CommSystemFacade.Status |
getStatus() |
Determine under what conditions we are remotely reachable.
|
java.util.SortedMap<java.lang.String,Transport> |
getTransports() |
|
boolean |
haveHighOutboundCapacity() |
|
boolean |
haveInboundCapacity(int pct) |
|
boolean |
haveOutboundCapacity(int pct) |
|
boolean |
isBacklogged(Hash peer) |
|
boolean |
isDummy() |
Is everything disabled for testing?
|
boolean |
isEstablished(Hash peer) |
|
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 |
mayDisconnect(Hash peer) |
Tell the comm system that we may disconnect from this peer.
|
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() |
推奨されていません。
unused
|
void |
registerTransport(Transport t) |
Pluggable transports.
|
java.lang.String |
renderPeerHTML(Hash peer) |
Provide a consistent "look" for displaying router IDs in the console
|
void |
renderStatusHTML(java.io.Writer out,
java.lang.String urlBase,
int sortFlags) |
As of 0.9.31, only outputs UPnP status
Warning - blocking, very slow, queries the active UPnP router,
will take many seconds if it has vanished.
|
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 peer) |
getMedianPeerClockSkew, getReachabilityStatus, renderStatusHTMLpublic CommSystemFacadeImpl(RouterContext context)
public void startup()
Servicepublic void shutdown()
public void restart()
Servicepublic int countActivePeers()
countActivePeers クラス内 CommSystemFacadepublic int countActiveSendPeers()
countActiveSendPeers クラス内 CommSystemFacadepublic boolean haveInboundCapacity(int pct)
haveInboundCapacity クラス内 CommSystemFacadepublic boolean haveOutboundCapacity(int pct)
haveOutboundCapacity クラス内 CommSystemFacadepublic boolean haveHighOutboundCapacity()
haveHighOutboundCapacity クラス内 CommSystemFacadepublic long getFramedAveragePeerClockSkew(int percentToInclude)
CommSystemFacadegetFramedAveragePeerClockSkew クラス内 CommSystemFacadepercentToInclude - 1-100public void processMessage(OutNetMessage msg)
processMessage クラス内 CommSystemFacadepublic boolean isBacklogged(Hash peer)
isBacklogged クラス内 CommSystemFacadepublic boolean isEstablished(Hash peer)
isEstablished クラス内 CommSystemFacadepublic java.util.Set<Hash> getEstablished()
CommSystemFacadegetEstablished クラス内 CommSystemFacadepublic boolean wasUnreachable(Hash peer)
wasUnreachable クラス内 CommSystemFacadepublic byte[] getIP(Hash peer)
getIP クラス内 CommSystemFacadepublic void mayDisconnect(Hash peer)
mayDisconnect クラス内 CommSystemFacadepublic java.util.List<java.lang.String> getMostRecentErrorMessages()
getMostRecentErrorMessages クラス内 CommSystemFacadepublic CommSystemFacade.Status getStatus()
CommSystemFacadegetStatus クラス内 CommSystemFacade@Deprecated public void recheckReachability()
recheckReachability クラス内 CommSystemFacadepublic void renderStatusHTML(java.io.Writer out,
java.lang.String urlBase,
int sortFlags)
throws java.io.IOException
renderStatusHTML クラス内 CommSystemFacadejava.io.IOExceptionpublic java.util.SortedMap<java.lang.String,Transport> getTransports()
getTransports クラス内 CommSystemFacadepublic java.util.List<RouterAddress> createAddresses()
CommSystemFacadecreateAddresses クラス内 CommSystemFacadepublic void notifyReplaceAddress(RouterAddress udpAddr)
notifyReplaceAddress クラス内 CommSystemFacadeudpAddr - may be null; or udpAddr's host/IP may be nullpublic void notifyRemoveAddress(RouterAddress address)
notifyRemoveAddress クラス内 CommSystemFacadeaddress - non-null; but address's host/IP may be nullpublic void notifyRemoveAddress(boolean ipv6)
notifyRemoveAddress クラス内 CommSystemFacadepublic void registerTransport(Transport t)
registerTransport クラス内 CommSystemFacadepublic void unregisterTransport(Transport t)
unregisterTransport クラス内 CommSystemFacadepublic DHSessionKeyBuilder.Factory getDHFactory()
getDHFactory クラス内 CommSystemFacadepublic void queueLookup(byte[] ip)
queueLookup クラス内 CommSystemFacadepublic java.lang.String getOurCountry()
getOurCountry クラス内 CommSystemFacadepublic boolean isInBadCountry()
isInBadCountry クラス内 CommSystemFacadepublic boolean isInBadCountry(Hash peer)
isInBadCountry クラス内 CommSystemFacadepeer - non-nullpublic boolean isInBadCountry(RouterInfo ri)
isInBadCountry クラス内 CommSystemFacaderi - non-nullpublic java.lang.String getCountry(Hash peer)
getCountry クラス内 CommSystemFacadepeer - not ourselves - use getOurCountry() for thatpublic java.lang.String getCountryName(java.lang.String c)
getCountryName クラス内 CommSystemFacadepublic java.lang.String renderPeerHTML(Hash peer)
renderPeerHTML クラス内 CommSystemFacadepublic boolean isDummy()
isDummy クラス内 CommSystemFacade