## net.i2p.client
Interface I2PSessionListener

All Known Implementing Classes:
  ATalk, I2PSocketManagerImpl, MessageHandler

    public interface I2PSessionListener

Define a means for the router to asynchronously notify the client that a new message is available or the router is under attack.

Author:
  jrandom

Method Summary
`void` `disconnected(I2PSession session)` Notify the client that the session has been terminated
`void` `errorOccurred(I2PSession session, java.lang.String message, java.lang.Throwable error)` Notify the client that some error occurred
`void` `messageAvailable(I2PSession session, int msgId, long size)` Instruct the client that the given session has received a message with size # of bytes.
`void` `reportAbuse(I2PSession session, int severity)` Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.

Method Detail

### messageAvailable

    void messageAvailable(I2PSession session,
                          int msgId,
                          long size)

  Instruct the client that the given session has received a message with size # of bytes.

  Parameters:
    `session` - session to notify
    `msgId` - message number available
    `size` - size of the message

### reportAbuse

    void reportAbuse(I2PSession session,
                     int severity)

  Instruct the client that the session specified seems to be under attack and that the client may wish to move its destination to another router.

  Parameters:
    `session` - session to report abuse to
    `severity` - how bad the abuse is

### disconnected

    void disconnected(I2PSession session)

  Notify the client that the session has been terminated

### errorOccurred

    void errorOccurred(I2PSession session,
                       java.lang.String message,
                       java.lang.Throwable error)

  Notify the client that some error occurred