|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.router.transport.ntcp.EventPumper
class EventPumper
The main NTCP NIO thread.
Constructor Summary | |
---|---|
EventPumper(RouterContext ctx,
NTCPTransport transport)
|
Method Summary | |
---|---|
long |
getIdleTimeout()
|
boolean |
isAlive()
Selector can take quite a while to close after calling stopPumping() |
void |
register(ServerSocketChannel chan)
Register the acceptor. |
void |
registerConnect(NTCPConnection con)
Outbound |
static void |
releaseBuf(ByteBuffer buf)
Return a read buffer to the pool. |
void |
run()
The selector loop. |
void |
startPumping()
|
void |
stopPumping()
|
void |
wantsRead(NTCPConnection con)
This is only called from NTCPConnection.complete() if there is more data, which is rare (never?) so we don't need to check for dups or make _wantsRead a Set. |
void |
wantsWrite(NTCPConnection con)
Called by the connection when it has data ready to write (after bw allocation). |
void |
wantsWrite(NTCPConnection con,
byte[] data)
Called by the connection when it has data ready to write. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventPumper(RouterContext ctx, NTCPTransport transport)
Method Detail |
---|
public void startPumping()
public void stopPumping()
public boolean isAlive()
public void register(ServerSocketChannel chan)
public void registerConnect(NTCPConnection con)
public void run()
run
in interface Runnable
public void wantsWrite(NTCPConnection con, byte[] data)
public void wantsWrite(NTCPConnection con)
public void wantsRead(NTCPConnection con)
public static void releaseBuf(ByteBuffer buf)
public long getIdleTimeout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |