class I2CPMessageProducer extends Object
Constructor and Description |
---|
I2CPMessageProducer(I2PAppContext 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 messages to the router destroying the session and disconnecting
|
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 the bandwidth setting
|
void |
updateTunnels(I2PSessionImpl session,
int tunnels)
Update number of tunnels
|
public I2CPMessageProducer(I2PAppContext context)
public void updateBandwidth(I2PSessionImpl session)
public void connect(I2PSessionImpl session) throws I2PSessionException
I2PSessionException
public void disconnect(I2PSessionImpl session) throws I2PSessionException
I2PSessionException
public 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 cryptoI2PSessionException
public 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 MessageStatusMessageI2PSessionException
public 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 MessageStatusMessageI2PSessionException
public void reportAbuse(I2PSessionImpl session, int msgId, int severity) throws I2PSessionException
I2PSessionException
public void createLeaseSet(I2PSessionImpl session, LeaseSet leaseSet, SigningPrivateKey signingPriv, List<PrivateKey> privs) throws I2PSessionException
signingPriv
- ignored for LS2I2PSessionException
public void updateTunnels(I2PSessionImpl session, int tunnels) throws I2PSessionException
tunnels
- 0 for original configured numberI2PSessionException