org.apache.coyote

## Interface ProtocolHandler

- All Known Implementing Classes:
    AbstractAjpProtocol, AbstractHttp11JsseProtocol, AbstractHttp11Protocol, AbstractProtocol, AjpAprProtocol, AjpNio2Protocol, AjpNioProtocol, AjpProtocol, Http11AprProtocol, Http11Nio2Protocol, Http11NioProtocol, Http11Protocol

      public interface ProtocolHandler

  Abstract the protocol implementation, including threading, etc. Processor is single threaded and specific to stream-based protocols, will not fit Jk protocols like JNI. This is the main interface to be implemented by a coyote connector. Adapter is the main interface to be implemented by a coyote servlet container.
  Author:
    Remy Maucherat, Costin Manolache
  See Also:
    `Adapter`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSslHostConfig(SSLHostConfig sslHostConfig)`
    `void` | `addUpgradeProtocol(UpgradeProtocol upgradeProtocol)`
    `void` | `destroy()` Destroy the protocol (optional).
    `SSLHostConfig[]` | `findSslHostConfigs()`
    `UpgradeProtocol[]` | `findUpgradeProtocols()`
    `Adapter` | `getAdapter()`
    `Executor` | `getExecutor()` The executor, provide access to the underlying thread pool.
    `void` | `init()` Initialise the protocol.
    `boolean` | `isAprRequired()` Requires APR/native library
    `boolean` | `isSendfileSupported()` Does this ProtocolHandler support sendfile?
    `void` | `pause()` Pause the protocol (optional).
    `void` | `resume()` Resume the protocol (optional).
    `void` | `setAdapter(Adapter adapter)` The adapter, used to call the connector.
    `void` | `start()` Start the protocol.
    `void` | `stop()` Stop the protocol.

- - ### Method Detail

    - #### setAdapter

          void setAdapter(Adapter adapter)

      The adapter, used to call the connector.
      Parameters:
        `adapter` - The adapter to associate

    - #### getAdapter

          Adapter getAdapter()

    - #### getExecutor

          Executor getExecutor()

      The executor, provide access to the underlying thread pool.
      Returns:
        The executor used to process requests

    - #### init

          void init()
                    throws Exception

      Initialise the protocol.
      Throws:
        `Exception` - If the protocol handler fails to initialise

    - #### start

          void start()
                     throws Exception

      Start the protocol.
      Throws:
        `Exception` - If the protocol handler fails to start

    - #### pause

          void pause()
                     throws Exception

      Pause the protocol (optional).
      Throws:
        `Exception` - If the protocol handler fails to pause

    - #### resume

          void resume()
                      throws Exception

      Resume the protocol (optional).
      Throws:
        `Exception` - If the protocol handler fails to resume

    - #### stop

          void stop()
                    throws Exception

      Stop the protocol.
      Throws:
        `Exception` - If the protocol handler fails to stop

    - #### destroy

          void destroy()
                       throws Exception

      Destroy the protocol (optional).
      Throws:
        `Exception` - If the protocol handler fails to destroy

    - #### isAprRequired

          boolean isAprRequired()

      Requires APR/native library
      Returns:
        `true` if this Protocol Handler requires the APR/native library, otherwise `false`

    - #### isSendfileSupported

          boolean isSendfileSupported()

      Does this ProtocolHandler support sendfile?
      Returns:
        `true` if this Protocol Handler supports sendfile, otherwise `false`

    - #### addSslHostConfig

          void addSslHostConfig(SSLHostConfig sslHostConfig)

    - #### findSslHostConfigs

          SSLHostConfig[] findSslHostConfigs()

    - #### addUpgradeProtocol

          void addUpgradeProtocol(UpgradeProtocol upgradeProtocol)

    - #### findUpgradeProtocols

          UpgradeProtocol[] findUpgradeProtocols()

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.