AprEndpoint.Sendfile (Apache Tomcat 9.0.118 API Documentation)
Description: declaration: package: org.apache.tomcat.util.net, class: AprEndpoint, class: Sendfile

# Class AprEndpoint.Sendfile

java.lang.Object
org.apache.tomcat.util.net.AprEndpoint.Sendfile

All Implemented Interfaces:
  `Runnable`

Enclosing class:
  `AprEndpoint`

public class AprEndpoint.Sendfile extends Object implements Runnable

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ArrayList<AprEndpoint.SendfileData>`
  `addS`
  `protected long[]`
  `desc`
  `protected long`
  `pool`
  `protected int`
  `sendfileCount`
  `protected HashMap<Long, AprEndpoint.SendfileData>`
  `sendfileData`
  `protected long`
  `sendfilePollset`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Sendfile()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SendfileState`
  `add(AprEndpoint.SendfileData data)`
  Add the sendfile data to the sendfile poller.
  `protected void`
  `destroy()`
  Destroy the poller.
  `int`
  `getSendfileCount()`
  `protected void`
  `init()`
  Create the sendfile poller.
  `protected void`
  `remove(AprEndpoint.SendfileData data)`
  Remove socket from the poller.
  `void`
  `run()`
  The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.
  `protected void`
  `start()`
  `protected void`
  `stop()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### sendfilePollset

    protected long sendfilePollset

  - ### pool

    protected long pool

  - ### desc

    protected long[] desc

  - ### sendfileData

    protected HashMap<Long, AprEndpoint.SendfileData> sendfileData

  - ### sendfileCount

    protected int sendfileCount

  - ### addS

    protected ArrayList<AprEndpoint.SendfileData> 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

    public 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

  - ### 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.
    Specified by:
      `run` in interface `Runnable`