net.i2p.router.transport.ntcp

## Class EventPumper

- java.lang.Object
- - net.i2p.router.transport.ntcp.EventPumper

- All Implemented Interfaces:
    Runnable

       class EventPumper
      extends Object
      implements Runnable

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventPumper(RouterContext ctx, NTCPTransport transport)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) ByteBuffer` | `acquireBuf()`
    `long` | `getIdleTimeout()`
    `boolean` | `isAlive()` Selector can take quite a while to close after calling stopPumping()
    `void` | `register(ServerSocketChannel chan)`
    `void` | `registerConnect(NTCPConnection con)`
    `(package private) void` | `releaseBuf(ByteBuffer buf)`
    `void` | `run()`
    `void` | `startPumping()`
    `void` | `stopPumping()`
    `void` | `wantsRead(NTCPConnection con)`
    `void` | `wantsWrite(NTCPConnection con)` called by the connection when it has data ready to write (after bw allocation)
    `void` | `wantsWrite(NTCPConnection con, byte[] data)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EventPumper

          public EventPumper(RouterContext ctx,
                     NTCPTransport transport)

  - ### Method Detail

    - #### startPumping

          public void startPumping()

    - #### stopPumping

          public void stopPumping()

    - #### isAlive

          public boolean isAlive()

      Selector can take quite a while to close after calling stopPumping()

    - #### register

          public void register(ServerSocketChannel chan)

    - #### registerConnect

          public void registerConnect(NTCPConnection con)

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`

    - #### wantsWrite

          public void wantsWrite(NTCPConnection con,
                        byte[] data)

    - #### wantsWrite

          public void wantsWrite(NTCPConnection con)

      called by the connection when it has data ready to write (after bw allocation)

    - #### wantsRead

          public void wantsRead(NTCPConnection con)

    - #### acquireBuf

          ByteBuffer acquireBuf()

    - #### releaseBuf

          void releaseBuf(ByteBuffer buf)

    - #### getIdleTimeout

          public long getIdleTimeout()