|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tomcat.util.net.NioEndpoint.Poller
public class NioEndpoint.Poller
Poller class.
Field Summary | |
---|---|
protected boolean |
close
|
protected ConcurrentLinkedQueue<Runnable> |
events
|
protected int |
keyCount
|
protected long |
nextExpiration
|
protected Selector |
selector
|
protected AtomicLong |
wakeupCounter
|
Constructor Summary | |
---|---|
NioEndpoint.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()
Processes events in the event queue of the Poller. |
int |
getKeyCount()
|
Selector |
getSelector()
|
protected boolean |
processKey(SelectionKey sk,
NioEndpoint.KeyAttachment attachment)
|
boolean |
processSendfile(SelectionKey sk,
NioEndpoint.KeyAttachment attachment,
boolean event)
|
boolean |
processSendfile(SelectionKey sk,
NioEndpoint.KeyAttachment attachment,
boolean reg,
boolean event)
Deprecated. Replaced by processSendfile(sk, attachment, 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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Selector selector
protected ConcurrentLinkedQueue<Runnable> events
protected volatile boolean close
protected long nextExpiration
protected AtomicLong wakeupCounter
protected volatile int keyCount
Constructor Detail |
---|
public NioEndpoint.Poller() throws IOException
IOException
Method Detail |
---|
public int getKeyCount()
public Selector getSelector()
protected void destroy()
public void addEvent(Runnable event)
public void cometInterest(NioChannel socket)
public void add(NioChannel socket)
socket
- to add to the pollerpublic void add(NioChannel socket, int interestOps)
public boolean events()
true
if some events were processed,
false
if queue was emptypublic void register(NioChannel socket)
public void cancelledKey(SelectionKey key, SocketStatus status, boolean dispatch)
public void run()
run
in interface Runnable
protected boolean processKey(SelectionKey sk, NioEndpoint.KeyAttachment attachment)
@Deprecated public boolean processSendfile(SelectionKey sk, NioEndpoint.KeyAttachment attachment, boolean reg, boolean event)
public boolean processSendfile(SelectionKey sk, NioEndpoint.KeyAttachment attachment, boolean event)
protected void unreg(SelectionKey sk, NioEndpoint.KeyAttachment attachment, int readyOps)
protected void reg(SelectionKey sk, NioEndpoint.KeyAttachment attachment, int intops)
protected void timeout(int keyCount, boolean hasEvents)
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |