public class JIoEndpoint.Poller
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected JIoEndpoint.SocketList |
addList
List of sockets to be added to the poller.
|
protected int |
connectionCount
Amount of connections inside this poller.
|
protected long |
lastMaintain
Last run of maintain.
|
protected JIoEndpoint.SocketList |
localAddList
List of sockets to be added to the poller.
|
protected JIoEndpoint.SocketTimeouts |
timeouts
Structure used for storing timeouts.
|
Constructor and Description |
---|
JIoEndpoint.Poller() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.net.Socket socket,
int timeout,
boolean resume,
boolean wakeup)
Add specified socket and associated pool to the poller.
|
protected void |
destroy()
Destroy the poller.
|
int |
getConnectionCount() |
protected void |
init()
Create the poller.
|
protected void |
maintain()
Timeout checks.
|
void |
run()
The background thread that listens for incoming TCP/IP connections and
hands them off to an appropriate processor.
|
protected JIoEndpoint.SocketList addList
protected JIoEndpoint.SocketList localAddList
protected JIoEndpoint.SocketTimeouts timeouts
protected long lastMaintain
protected int connectionCount
public int getConnectionCount()
protected void init()
protected void destroy()
public void add(java.net.Socket socket, int timeout, boolean resume, boolean wakeup)
socket
- to add to the pollerprotected void maintain()
public void run()
run
in interface java.lang.Runnable