org.apache.tomcat.util.net
public class NioEndpoint.Poller extends Object implements Runnable
Field Summary | |
---|---|
protected boolean | close |
protected ConcurrentLinkedQueue<Runnable> | events |
protected long | nextExpiration |
protected Selector | selector |
protected CountDownLatch | stopLatch |
protected AtomicLong | wakeupCounter |
Constructor Summary | |
---|---|
Poller() |
Method Summary | |
---|---|
void | add(NioChannel socket)
Add specified socket and associated pool to the poller. |
void | add(NioChannel socket, int interestOps) |
void | addEvent(Runnable event) |
void | cancelledKey(SelectionKey key, SocketStatus status, boolean dispatch) |
void | cometInterest(NioChannel socket) |
protected void | destroy()
Destroy the poller. |
boolean | events() |
Selector | getSelector() |
protected boolean | processKey(SelectionKey sk, NioEndpoint.KeyAttachment attachment) |
boolean | processSendfile(SelectionKey sk, NioEndpoint.KeyAttachment attachment, boolean reg, boolean event) |
protected void | reg(SelectionKey sk, NioEndpoint.KeyAttachment attachment, int intops) |
void | register(NioChannel socket) |
void | run()
The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor. |
protected void | timeout(int keyCount, boolean hasEvents) |
protected void | unreg(SelectionKey sk, NioEndpoint.KeyAttachment attachment, int readyOps) |
void | wakeup() |
Parameters: socket to add to the poller