AbstractProcessor (Apache Tomcat 7.0.104 API Documentation)

org.apache.coyote.http11.upgrade

## Class AbstractProcessor<S>

- java.lang.Object
- - org.apache.coyote.http11.upgrade.AbstractProcessor<S>

- All Implemented Interfaces:
    WebConnection, Processor<S>
  Direct Known Subclasses:
    AprProcessor, BioProcessor, NioProcessor

      public abstract class AbstractProcessor<S>
      extends Object
      implements Processor<S>, WebConnection

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static StringManager` | `sm`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractProcessor(HttpUpgradeHandler httpUpgradeHandler, AbstractServletInputStream upgradeServletInputStream, AbstractServletOutputStream upgradeServletOutputStream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractEndpoint.Handler.SocketState` | `asyncDispatch(SocketStatus status)`
    `AbstractEndpoint.Handler.SocketState` | `asyncPostProcess()`
    `void` | `close()` The Servlet 3.1 interface extends AutoCloseable but that is not available in Java 6 so this is the single method from that interface.
    `void` | `errorDispatch()`
    `AbstractEndpoint.Handler.SocketState` | `event(SocketStatus status)`
    `AsyncStateMachine<S>` | `getAsyncStateMachine()`
    `Executor` | `getExecutor()`
    `HttpUpgradeHandler` | `getHttpUpgradeHandler()`
    `AbstractServletInputStream` | `getInputStream()` Provides access to the `AbstractServletInputStream` for reading data from the client.
    `protected abstract Log` | `getLog()`
    `AbstractServletOutputStream` | `getOutputStream()` Provides access to the `AbstractServletOutputStream` for writing data to the client.
    `Request` | `getRequest()`
    `UpgradeInbound` | `getUpgradeInbound()` Deprecated.
    `boolean` | `isAsync()`
    `boolean` | `isComet()`
    `boolean` | `isUpgrade()`
    `AbstractEndpoint.Handler.SocketState` | `process(SocketWrapper<S> socketWrapper)`
    `void` | `recycle(boolean socketClosing)`
    `void` | `setSslSupport(SSLSupport sslSupport)`
    `AbstractEndpoint.Handler.SocketState` | `upgradeDispatch()`
    `AbstractEndpoint.Handler.SocketState` | `upgradeDispatch(SocketStatus status)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

  - ### Constructor Detail

    - #### AbstractProcessor

          protected AbstractProcessor(HttpUpgradeHandler httpUpgradeHandler,
                           AbstractServletInputStream upgradeServletInputStream,
                           AbstractServletOutputStream upgradeServletOutputStream)

  - ### Method Detail

    - #### getLog

          protected abstract Log getLog()

    - #### close

          public void close()
                     throws Exception

      Description copied from interface: `WebConnection`
      The Servlet 3.1 interface extends AutoCloseable but that is not available in Java 6 so this is the single method from that interface.
      Specified by:
        `close` in interface `WebConnection`
      Throws:
        `Exception`

    - #### getInputStream

          public AbstractServletInputStream getInputStream()
                                                    throws IOException

      Description copied from interface: `WebConnection`
      Provides access to the `AbstractServletInputStream` for reading data from the client.
      Specified by:
        `getInputStream` in interface `WebConnection`
      Throws:
        `IOException`

    - #### getOutputStream

          public AbstractServletOutputStream getOutputStream()
                                                      throws IOException

      Description copied from interface: `WebConnection`
      Provides access to the `AbstractServletOutputStream` for writing data to the client.
      Specified by:
        `getOutputStream` in interface `WebConnection`
      Throws:
        `IOException`

    - #### isUpgrade

          public final boolean isUpgrade()

      Specified by:
        `isUpgrade` in interface `Processor<S>`

    - #### getHttpUpgradeHandler

          public HttpUpgradeHandler getHttpUpgradeHandler()

      Specified by:
        `getHttpUpgradeHandler` in interface `Processor<S>`

    - #### upgradeDispatch

          public final AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketStatus status)
                                                                     throws IOException

      Specified by:
        `upgradeDispatch` in interface `Processor<S>`
      Throws:
        `IOException`

    - #### recycle

          public final void recycle(boolean socketClosing)

      Specified by:
        `recycle` in interface `Processor<S>`

    - #### getAsyncStateMachine

          public final AsyncStateMachine<S> getAsyncStateMachine()

      Specified by:
        `getAsyncStateMachine` in interface `Processor<S>`

    - #### getUpgradeInbound

          @Deprecated
          public UpgradeInbound getUpgradeInbound()

      Deprecated.
      Specified by:
        `getUpgradeInbound` in interface `Processor<S>`
      Returns:
        Listener to which data available events are passed once the associated connection has completed the proprietary Tomcat HTTP upgrade process.

    - #### upgradeDispatch

          public AbstractEndpoint.Handler.SocketState upgradeDispatch()
                                                               throws IOException

      Specified by:
        `upgradeDispatch` in interface `Processor<S>`
      Returns:
        The socket state once the upgrade dispatch event has been processed.
      Throws:
        `IOException` - An IO error occurred

    - #### getExecutor

          public final Executor getExecutor()

      Specified by:
        `getExecutor` in interface `Processor<S>`

    - #### process

          public final AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socketWrapper)
                                                             throws IOException

      Specified by:
        `process` in interface `Processor<S>`
      Throws:
        `IOException`

    - #### event

          public final AbstractEndpoint.Handler.SocketState event(SocketStatus status)
                                                           throws IOException

      Specified by:
        `event` in interface `Processor<S>`
      Throws:
        `IOException`

    - #### asyncDispatch

          public final AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)

      Specified by:
        `asyncDispatch` in interface `Processor<S>`

    - #### errorDispatch

          public void errorDispatch()

      Specified by:
        `errorDispatch` in interface `Processor<S>`

    - #### asyncPostProcess

          public final AbstractEndpoint.Handler.SocketState asyncPostProcess()

      Specified by:
        `asyncPostProcess` in interface `Processor<S>`

    - #### isComet

          public final boolean isComet()

      Specified by:
        `isComet` in interface `Processor<S>`

    - #### isAsync

          public final boolean isAsync()

      Specified by:
        `isAsync` in interface `Processor<S>`

    - #### getRequest

          public final Request getRequest()

      Specified by:
        `getRequest` in interface `Processor<S>`

    - #### setSslSupport

          public final void setSslSupport(SSLSupport sslSupport)

      Specified by:
        `setSslSupport` in interface `Processor<S>`

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