Package net.i2p.router.peermanager
Class PeerManagerFacadeImpl
java.lang.Object
net.i2p.router.peermanager.PeerManagerFacadeImpl
- All Implemented Interfaces:
PeerManagerFacade
,Service
Base implementation that has simple algorithms and periodically saves state
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
countPeersByCapability
(char capability) getPeersByCapability
(char capability) void
removeCapabilities
(Hash peer) void
renderStatusHTML
(Writer out) Deprecated.moved to routerconsolevoid
restart()
Perform a soft restart.selectRandomByCapability
(char capability) Deprecated.unusedvoid
setCapabilities
(Hash peer, String caps) void
shutdown()
Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.void
startup()
Instruct the service that it should start normal operation.
-
Constructor Details
-
PeerManagerFacadeImpl
-
-
Method Details
-
startup
public void startup()Description copied from interface:Service
Instruct the service that it should start normal operation. This call DOES block until the service is ready. -
shutdown
public void shutdown()Description copied from interface:Service
Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. It should not depend on other components at this point. This call DOES block. -
restart
public void restart()Description copied from interface:Service
Perform a soft restart. -
setCapabilities
- Specified by:
setCapabilities
in interfacePeerManagerFacade
- Parameters:
caps
- non-null
-
removeCapabilities
- Specified by:
removeCapabilities
in interfacePeerManagerFacade
-
selectRandomByCapability
Deprecated.unused- Specified by:
selectRandomByCapability
in interfacePeerManagerFacade
-
getPeersByCapability
- Specified by:
getPeersByCapability
in interfacePeerManagerFacade
- Parameters:
capability
- case-insensitive- Returns:
- non-null unmodifiable set
-
countPeersByCapability
public int countPeersByCapability(char capability) - Specified by:
countPeersByCapability
in interfacePeerManagerFacade
- Parameters:
capability
- case-insensitive- Returns:
- how many
- Since:
- 0.9.45
-
renderStatusHTML
Deprecated.moved to routerconsole- Specified by:
renderStatusHTML
in interfaceService
- Throws:
IOException
-