net.i2p.router.transport.ntcp
Class EventPumper
java.lang.Object
net.i2p.router.transport.ntcp.EventPumper
- All Implemented Interfaces:
- Runnable
public class EventPumper
- extends Object
- implements Runnable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventPumper
public EventPumper(RouterContext ctx,
NTCPTransport transport)
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()