Package net.i2p.router.dummy
Class DummyPeerManagerFacade
- java.lang.Object
-
- net.i2p.router.dummy.DummyPeerManagerFacade
-
- All Implemented Interfaces:
PeerManagerFacade,Service
public class DummyPeerManagerFacade extends Object implements PeerManagerFacade
Manage peer references and keep them up to date so that when asked for peers, it can provide appropriate peers according to the criteria provided. This includes periodically queueing up outbound messages to the peers to test them.
-
-
Constructor Summary
Constructors Constructor Description DummyPeerManagerFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountPeersByCapability(char capability)Set<Hash>getPeersByCapability(char capability)voidremoveCapabilities(Hash peer)voidrenderStatusHTML(Writer out)voidrestart()Perform a soft restart.HashselectRandomByCapability(char capability)voidsetCapabilities(Hash peer, String caps)voidshutdown()Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.voidstartup()Instruct the service that it should start normal operation.
-
-
-
Method Detail
-
shutdown
public void shutdown()
Description copied from interface:ServiceInstruct 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.
-
startup
public void startup()
Description copied from interface:ServiceInstruct the service that it should start normal operation. This call DOES block until the service is ready.
-
restart
public void restart()
Description copied from interface:ServicePerform a soft restart.
-
renderStatusHTML
public void renderStatusHTML(Writer out)
- Specified by:
renderStatusHTMLin interfaceService
-
getPeersByCapability
public Set<Hash> getPeersByCapability(char capability)
- Specified by:
getPeersByCapabilityin interfacePeerManagerFacade
-
countPeersByCapability
public int countPeersByCapability(char capability)
- Specified by:
countPeersByCapabilityin interfacePeerManagerFacade
-
setCapabilities
public void setCapabilities(Hash peer, String caps)
- Specified by:
setCapabilitiesin interfacePeerManagerFacade
-
removeCapabilities
public void removeCapabilities(Hash peer)
- Specified by:
removeCapabilitiesin interfacePeerManagerFacade
-
selectRandomByCapability
public Hash selectRandomByCapability(char capability)
- Specified by:
selectRandomByCapabilityin interfacePeerManagerFacade
-
-