org.apache.tomcat.util.net

Class AprEndpoint.Poller

public class AprEndpoint.Poller extends Object implements Runnable

Poller class.
Field Summary
protected intaddCount
protected long[]addS
protected booleancomet
protected long[]desc
protected intkeepAliveCount
protected longpool
protected longserverPollset
Constructor Summary
Poller(boolean comet)
Method Summary
voidadd(long socket)
Add specified socket and associated pool to the poller.
protected voiddestroy()
Destroy the poller.
intgetKeepAliveCount()
protected voidinit()
Create the poller.
voidrun()
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.

Field Detail

addCount

protected int addCount

addS

protected long[] addS

comet

protected boolean comet

desc

protected long[] desc

keepAliveCount

protected int keepAliveCount

pool

protected long pool

serverPollset

protected long serverPollset

Constructor Detail

Poller

public Poller(boolean comet)

Method Detail

add

public void add(long socket)
Add specified socket and associated pool to the poller. The socket will be added to a temporary array, and polled first after a maximum amount of time equal to pollTime (in most cases, latency will be much lower, however).

Parameters: socket to add to the poller

destroy

protected void destroy()
Destroy the poller.

getKeepAliveCount

public int getKeepAliveCount()

init

protected void init()
Create the poller. With some versions of APR, the maximum poller size will be 62 (recompiling APR is necessary to remove this limitation).

run

public void run()
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.