Class AprEndpoint.Sendfile
java.lang.Object
org.apache.tomcat.util.net.AprEndpoint.Sendfile
- All Implemented Interfaces:
Runnable
- Enclosing class:
AprEndpoint
- Author:
- Mladen Turk, Remy Maucherat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<AprEndpoint.SendfileData> protected long[]protected longprotected intprotected HashMap<Long, AprEndpoint.SendfileData> protected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(AprEndpoint.SendfileData data) Add the sendfile data to the sendfile poller.protected voiddestroy()Destroy the poller.intprotected voidinit()Create the sendfile poller.protected voidRemove 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 Details
-
sendfilePollset
protected long sendfilePollset -
pool
protected long pool -
desc
protected long[] desc -
sendfileData
-
sendfileCount
protected int sendfileCount -
addS
-
-
Constructor Details
-
Sendfile
public Sendfile()
-
-
Method Details
-
getSendfileCount
public int getSendfileCount() -
init
protected void init()Create the sendfile poller. -
start
protected void start() -
stop
protected void stop() -
destroy
protected void destroy()Destroy the poller. -
add
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
-
remove
Remove socket from the poller.- Parameters:
data- the sendfile data which should be removed
-
run
-