org.apache.tomcat.util.net

Class AprEndpoint.Sendfile

public class AprEndpoint.Sendfile extends Object implements Runnable

Sendfile class.
Field Summary
protected ArrayList<AprEndpoint.SendfileData>addS
protected long[]desc
protected longpool
protected intsendfileCount
protected HashMap<Long,AprEndpoint.SendfileData>sendfileData
protected longsendfilePollset
Method Summary
booleanadd(AprEndpoint.SendfileData data)
Add the sendfile data to the sendfile poller.
protected voiddestroy()
Destroy the poller.
intgetSendfileCount()
protected voidinit()
Create the sendfile poller.
protected voidremove(AprEndpoint.SendfileData data)
Remove socket from the poller.
voidrun()
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.

Field Detail

addS

protected ArrayList<AprEndpoint.SendfileData> addS

desc

protected long[] desc

pool

protected long pool

sendfileCount

protected int sendfileCount

sendfileData

protected HashMap<Long,AprEndpoint.SendfileData> sendfileData

sendfilePollset

protected long sendfilePollset

Method Detail

add

public boolean add(AprEndpoint.SendfileData data)
Add the sendfile data to the sendfile poller. Note that in most cases, the initial non blocking calls to sendfile will return right away, and will be handled asynchronously inside the kernel. As a result, the poller will never be used.

Parameters: data containing the reference to the data which should be snet

Returns: true if all the data has been sent right away, and false otherwise

destroy

protected void destroy()
Destroy the poller.

getSendfileCount

public int getSendfileCount()

init

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

remove

protected void remove(AprEndpoint.SendfileData data)
Remove socket from the poller.

Parameters: data the sendfile data which should be removed

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.