class I2CPMessageProducer extends Object
| Constructor and Description |
|---|
I2CPMessageProducer(I2PAppContext context)Create a message producer for the given context. |
| Modifier and Type | Method and Description |
|---|---|
void | connect(I2PSessionImpl session)Send all the messages that a client needs to send to a router to establish
a new session. |
void | createLeaseSet(I2PSessionImpl session,
LeaseSet leaseSet,
SigningPrivateKey signingPriv,
List<PrivateKey> privs)In response to a RequestLeaseSet Message from the router, send a
CreateLeaseset Message back to the router. |
void | disconnect(I2PSessionImpl session)Send a message to the router destroying the session, which could be a subsession. |
void | reportAbuse(I2PSessionImpl session,
int msgId,
int severity)Send an abuse message to the router |
void | sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
long expires,
int flags)Package up and send the payload to the router for delivery |
void | sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
SendMessageOptions options)Package up and send the payload to the router for delivery |
void | sendMessage(I2PSessionImpl session,
Destination dest,
long nonce,
byte[] payload,
SessionTag tag,
SessionKey key,
Set<SessionTag> tags,
SessionKey newKey,
long expires)Package up and send the payload to the router for delivery |
void | updateBandwidth(I2PSessionImpl session)Update bandwidth limits from session options. |
void | updateTunnels(I2PSessionImpl session,
int tunnels)Update number of tunnels |
public I2CPMessageProducer(I2PAppContext context)
context - the router contextpublic void connect(I2PSessionImpl session) throws I2PSessionException
I2PSessionExceptionpublic void createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) throws I2PSessionException
signingPriv - unused for LS2 lease setsI2PSessionExceptionpublic void disconnect(I2PSessionImpl session) throws I2PSessionException
I2PSessionExceptionpublic void reportAbuse(I2PSessionImpl session, int msgId, int severity) throws I2PSessionException
I2PSessionExceptionpublic void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, long expires, int flags) throws I2PSessionException
nonce - 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessageI2PSessionExceptionpublic void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SendMessageOptions options) throws I2PSessionException
nonce - 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessageI2PSessionExceptionpublic void sendMessage(I2PSessionImpl session, Destination dest, long nonce, byte[] payload, SessionTag tag, SessionKey key, Set<SessionTag> tags, SessionKey newKey, long expires) throws I2PSessionException
nonce - 0 to 0xffffffff; if 0, the router will not reply with a MessageStatusMessagetag - unused - no end-to-end cryptotags - unused - no end-to-end cryptokey - unused - no end-to-end cryptonewKey - unused - no end-to-end cryptoI2PSessionExceptionpublic void updateBandwidth(I2PSessionImpl session)
public void updateTunnels(I2PSessionImpl session, int tunnels) throws I2PSessionException
tunnels - 0 for original configured numberI2PSessionException