|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.client.ClientConnectionRunner
public class ClientConnectionRunner
Bridge the router and the client - managing state for a client.
Constructor Summary | |
---|---|
ClientConnectionRunner(RouterContext context,
ClientManager manager,
java.net.Socket socket)
Create a new runner against the given socket |
Method Summary | |
---|---|
(package private) void |
ackSendMessage(MessageId id,
long nonce)
Send a notification to the client that their message (id specified) was accepted for delivery (but not necessarily delivered) |
(package private) void |
disconnectClient(java.lang.String reason)
|
(package private) void |
disconnected()
|
(package private) MessageId |
distributeMessage(SendMessageMessage message)
Distribute the message. |
(package private) void |
doSend(I2CPMessage msg)
Actually send the I2CPMessage to the peer through the socket |
SessionConfig |
getConfig()
current client's config |
Hash |
getDestHash()
|
(package private) boolean |
getIsDead()
|
(package private) LeaseRequestState |
getLeaseRequest()
data for the current leaseRequest, or null if there is no active leaseSet request |
LeaseSet |
getLeaseSet()
currently allocated leaseSet |
(package private) static int |
getNextMessageId()
|
(package private) Payload |
getPayload(MessageId id)
message body |
(package private) SessionId |
getSessionId()
current client's sessionId |
(package private) boolean |
isDead()
already closed? |
(package private) void |
leaseSetCreated(LeaseSet ls)
called after a new leaseSet is granted by the client, the NetworkDb has been updated. |
(package private) void |
receiveMessage(Destination toDest,
Destination fromDest,
Payload payload)
Asynchronously deliver the message to the current runner |
(package private) void |
removePayload(MessageId id)
|
void |
reportAbuse(java.lang.String reason,
int severity)
Send async abuse message to the client |
(package private) void |
requestLeaseSet(LeaseSet set,
long expirationTime,
Job onCreateJob,
Job onFailedJob)
Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up. |
(package private) void |
sessionEstablished(SessionConfig config)
|
(package private) void |
setLeaseRequest(LeaseRequestState req)
|
(package private) void |
setLeaseSet(LeaseSet ls)
|
(package private) void |
setPayload(MessageId id,
Payload payload)
|
(package private) void |
setSessionId(SessionId id)
|
void |
startRunning()
Actually run the connection - listen for I2CP messages and respond. |
(package private) void |
stopRunning()
die a horrible death |
(package private) void |
updateMessageDeliveryStatus(MessageId id,
boolean delivered)
|
(package private) void |
writeMessage(I2CPMessage msg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientConnectionRunner(RouterContext context, ClientManager manager, java.net.Socket socket)
Method Detail |
---|
public void startRunning()
I2CPMessageReader
void stopRunning()
public SessionConfig getConfig()
public LeaseSet getLeaseSet()
void setLeaseSet(LeaseSet ls)
public Hash getDestHash()
SessionId getSessionId()
void setSessionId(SessionId id)
LeaseRequestState getLeaseRequest()
void setLeaseRequest(LeaseRequestState req)
boolean isDead()
Payload getPayload(MessageId id)
void setPayload(MessageId id, Payload payload)
void removePayload(MessageId id)
void sessionEstablished(SessionConfig config)
void updateMessageDeliveryStatus(MessageId id, boolean delivered)
void leaseSetCreated(LeaseSet ls)
void disconnectClient(java.lang.String reason)
MessageId distributeMessage(SendMessageMessage message)
void ackSendMessage(MessageId id, long nonce)
void receiveMessage(Destination toDest, Destination fromDest, Payload payload)
public void reportAbuse(java.lang.String reason, int severity)
void requestLeaseSet(LeaseSet set, long expirationTime, Job onCreateJob, Job onFailedJob)
set
- LeaseSet with requested leases - this object must be updated to contain the
signed version (as well as any changed/added/removed Leases)expirationTime
- ms to wait before failingonCreateJob
- Job to run after the LeaseSet is authorizedonFailedJob
- Job to run after the timeout passes without receiving authorizationvoid disconnected()
boolean getIsDead()
void writeMessage(I2CPMessage msg)
void doSend(I2CPMessage msg) throws I2CPMessageException
I2CPMessageException
static int getNextMessageId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |