net.i2p.client
Class I2CPMessageProducer

java.lang.Object
  extended bynet.i2p.client.I2CPMessageProducer

class I2CPMessageProducer
extends java.lang.Object

Produce the various messages the session needs to send to the router.

Author:
jrandom

Constructor Summary
I2CPMessageProducer(I2PAppContext context)
           
 
Method Summary
 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, PrivateKey priv)
          Create a new signed leaseSet in response to a request to do so and send it 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, SessionTag tag, SessionKey key, java.util.Set tags, SessionKey newKey)
          Package up and send the payload to the router for delivery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I2CPMessageProducer

public I2CPMessageProducer(I2PAppContext context)
Method Detail

connect

public void connect(I2PSessionImpl session)
             throws I2PSessionException
Send all the messages that a client needs to send to a router to establish a new session.

Throws:
I2PSessionException

disconnect

public void disconnect(I2PSessionImpl session)
                throws I2PSessionException
Send messages to the router destroying the session and disconnecting

Throws:
I2PSessionException

sendMessage

public void sendMessage(I2PSessionImpl session,
                        Destination dest,
                        long nonce,
                        byte[] payload,
                        SessionTag tag,
                        SessionKey key,
                        java.util.Set tags,
                        SessionKey newKey)
                 throws I2PSessionException
Package up and send the payload to the router for delivery

Throws:
I2PSessionException

reportAbuse

public void reportAbuse(I2PSessionImpl session,
                        int msgId,
                        int severity)
                 throws I2PSessionException
Send an abuse message to the router

Throws:
I2PSessionException

createLeaseSet

public void createLeaseSet(I2PSessionImpl session,
                           LeaseSet leaseSet,
                           SigningPrivateKey signingPriv,
                           PrivateKey priv)
                    throws I2PSessionException
Create a new signed leaseSet in response to a request to do so and send it to the router

Throws:
I2PSessionException