Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.router.client
Class ClientMessageEventListener

    java.lang.Object
      net.i2p.router.client.ClientMessageEventListener

All Implemented Interfaces:
  I2CPMessageReader.I2CPMessageEventListener

     class ClientMessageEventListener

extends Object
implements I2CPMessageReader.I2CPMessageEventListener

Receive events from the client and handle them accordingly (updating the runner when necessary)

Constructor Summary
`ClientMessageEventListener(RouterContext context, ClientConnectionRunner runner, boolean enforceAuth)`

Method Summary
`void` | `disconnected(I2CPMessageReader reader)` Notify the listener that the stream the given reader was running off closed
`void` | `messageReceived(I2CPMessageReader reader, I2CPMessage message)` Handle an incoming message and dispatch it to the appropriate handler
`void` | `readError(I2CPMessageReader reader, Exception error)` Handle notification that there was an error

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClientMessageEventListener

    public ClientMessageEventListener(RouterContext context,
                                      ClientConnectionRunner runner,
                                      boolean enforceAuth)

Parameters:
  `enforceAuth` - set false for in-JVM, true for socket access

Method Detail

### messageReceived

    public void messageReceived(I2CPMessageReader reader,
                                I2CPMessage message)

  Handle an incoming message and dispatch it to the appropriate handler

  Specified by:
    `messageReceived` in interface `I2CPMessageReader.I2CPMessageEventListener`
  Parameters:
    `reader` - I2CPMessageReader to notify
    `message` - the I2CPMessage

### readError

    public void readError(I2CPMessageReader reader,
                          Exception error)

  Handle notification that there was an error

  Specified by:
    `readError` in interface `I2CPMessageReader.I2CPMessageEventListener`
  Parameters:
    `reader` - I2CPMessageReader to notify
    `error` - Exception that was thrown

### disconnected

    public void disconnected(I2CPMessageReader reader)

  Description copied from interface: `I2CPMessageReader.I2CPMessageEventListener`
  Notify the listener that the stream the given reader was running off closed

  Specified by:
    `disconnected` in interface `I2CPMessageReader.I2CPMessageEventListener`
  Parameters:
    `reader` - I2CPMessageReader to notify

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD