net.i2p.router.transport.ntcp
Class EventPumper

java.lang.Object
  extended by net.i2p.router.transport.ntcp.EventPumper
All Implemented Interfaces:
java.lang.Runnable

public class EventPumper
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
EventPumper(RouterContext ctx, NTCPTransport transport)
           
 
Method Summary
(package private)  java.nio.ByteBuffer acquireBuf()
           
 long getIdleTimeout()
           
 boolean isAlive()
          Selector can take quite a while to close after calling stopPumping()
 void register(java.nio.channels.ServerSocketChannel chan)
           
 void registerConnect(NTCPConnection con)
           
(package private)  void releaseBuf(java.nio.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(java.nio.channels.ServerSocketChannel chan)

registerConnect

public void registerConnect(NTCPConnection con)

run

public void run()
Specified by:
run in interface java.lang.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

java.nio.ByteBuffer acquireBuf()

releaseBuf

void releaseBuf(java.nio.ByteBuffer buf)

getIdleTimeout

public long getIdleTimeout()