|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.ClientManagerFacade
net.i2p.router.client.ClientManagerFacadeImpl
public class ClientManagerFacadeImpl
Base impl of the client facade
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_HOST
|
static int |
DEFAULT_PORT
|
static java.lang.String |
PROP_CLIENT_HOST
|
static java.lang.String |
PROP_CLIENT_PORT
|
Fields inherited from class net.i2p.router.ClientManagerFacade |
---|
PROP_CLIENT_ONLY |
Constructor Summary | |
---|---|
ClientManagerFacadeImpl(RouterContext context)
|
Method Summary | |
---|---|
SessionConfig |
getClientSessionConfig(Destination dest)
Return the client's current config, or null if not connected |
boolean |
isLocal(Destination dest)
Determine if the destination specified is managed locally. |
boolean |
isLocal(Hash destHash)
Determine if the destination specified is managed locally. |
java.util.Set |
listClients()
Return the list of locally connected clients |
void |
messageDeliveryStatusUpdate(Destination fromDest,
MessageId id,
boolean delivered)
|
void |
messageReceived(ClientMessage msg)
|
void |
renderStatusHTML(java.io.Writer out)
|
void |
reportAbuse(Destination dest,
java.lang.String reason,
int severity)
Instruct the client (or all clients) that they are under attack. |
void |
requestLeaseSet(Destination dest,
LeaseSet set,
long timeout,
Job onCreateJob,
Job onFailedJob)
Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up. |
void |
requestLeaseSet(Hash dest,
LeaseSet set)
|
void |
restart()
Perform a soft restart. |
boolean |
shouldPublishLeaseSet(Hash destinationHash)
Does the client specified want their leaseSet published? |
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. |
boolean |
verifyClientLiveliness()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_CLIENT_PORT
public static final int DEFAULT_PORT
public static final java.lang.String PROP_CLIENT_HOST
public static final java.lang.String DEFAULT_HOST
Constructor Detail |
---|
public ClientManagerFacadeImpl(RouterContext context)
Method Detail |
---|
public void startup()
Service
public void shutdown()
Service
public void restart()
Service
public boolean verifyClientLiveliness()
verifyClientLiveliness
in class ClientManagerFacade
public void requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)
requestLeaseSet
in class ClientManagerFacade
dest
- Destination from which the LeaseSet's authorization should be requestedset
- LeaseSet with requested leases - this object must be updated to contain the
signed version (as well as any changed/added/removed Leases)timeout
- ms to wait before failingonCreateJob
- Job to run after the LeaseSet is authorizedonFailedJob
- Job to run after the timeout passes without receiving authorizationpublic void requestLeaseSet(Hash dest, LeaseSet set)
requestLeaseSet
in class ClientManagerFacade
public void reportAbuse(Destination dest, java.lang.String reason, int severity)
reportAbuse
in class ClientManagerFacade
dest
- Destination under attack, or null if all destinations are affectedreason
- Why the router thinks that there is abusive behaviorseverity
- How severe the abuse is, with 0 being not severe and 255 is the maxpublic boolean isLocal(Destination dest)
isLocal
in class ClientManagerFacade
dest
- Destination to be checkedpublic boolean isLocal(Hash destHash)
isLocal
in class ClientManagerFacade
destHash
- Hash of Destination to be checkedpublic boolean shouldPublishLeaseSet(Hash destinationHash)
ClientManagerFacade
shouldPublishLeaseSet
in class ClientManagerFacade
public void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, boolean delivered)
messageDeliveryStatusUpdate
in class ClientManagerFacade
public void messageReceived(ClientMessage msg)
messageReceived
in class ClientManagerFacade
public SessionConfig getClientSessionConfig(Destination dest)
getClientSessionConfig
in class ClientManagerFacade
public void renderStatusHTML(java.io.Writer out) throws java.io.IOException
renderStatusHTML
in interface Service
renderStatusHTML
in class ClientManagerFacade
java.io.IOException
public java.util.Set listClients()
listClients
in class ClientManagerFacade
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |