Package org.apache.tomcat.util.net
Class AprEndpoint.Sendfile
- java.lang.Object
- 
- org.apache.tomcat.util.net.AprEndpoint.Sendfile
 
- 
- All Implemented Interfaces:
- java.lang.Runnable
 - Enclosing class:
- AprEndpoint
 
 public class AprEndpoint.Sendfile extends java.lang.Object implements java.lang.Runnable
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.ArrayList<AprEndpoint.SendfileData>addSprotected long[]descprotected longpoolprotected intsendfileCountprotected java.util.HashMap<java.lang.Long,AprEndpoint.SendfileData>sendfileDataprotected longsendfilePollset
 - 
Constructor SummaryConstructors Constructor Description Sendfile()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SendfileStateadd(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.protected voidstart()protected voidstop()
 
- 
- 
- 
Field Detail- 
sendfilePollsetprotected long sendfilePollset 
 - 
poolprotected long pool 
 - 
descprotected long[] desc 
 - 
sendfileDataprotected java.util.HashMap<java.lang.Long,AprEndpoint.SendfileData> sendfileData 
 - 
sendfileCountprotected int sendfileCount 
 - 
addSprotected java.util.ArrayList<AprEndpoint.SendfileData> addS 
 
- 
 - 
Method Detail- 
getSendfileCountpublic int getSendfileCount() 
 - 
initprotected void init() Create the sendfile poller.
 - 
startprotected void start() 
 - 
stopprotected void stop() 
 - 
destroyprotected void destroy() Destroy the poller.
 - 
addpublic SendfileState 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 sent
- Returns:
- true if all the data has been sent right away, and false otherwise
 
 - 
removeprotected void remove(AprEndpoint.SendfileData data) Remove socket from the poller.- Parameters:
- data- the sendfile data which should be removed
 
 - 
runpublic void run() The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.- Specified by:
- runin interface- java.lang.Runnable
 
 
- 
 
-