UpgradeProcessorInternal (Apache Tomcat 11.0.22 API Documentation)
Description: declaration: package: org.apache.coyote.http11.upgrade, class: UpgradeProcessorInternal

# Class UpgradeProcessorInternal

java.lang.Object
org.apache.coyote.AbstractProcessorLight
org.apache.coyote.http11.upgrade.UpgradeProcessorBase
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal

All Implemented Interfaces:
  `WebConnection, AutoCloseable, Processor`

public class UpgradeProcessorInternal extends UpgradeProcessorBase

- ## Field Summary

  ### Fields inherited from class UpgradeProcessorBase

  `INFINITE_TIMEOUT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `AbstractEndpoint.Handler.SocketState`
  `dispatch(SocketEvent status)`
  Process an in-progress request that is no longer in standard HTTP mode.
  `ServletInputStream`
  `getInputStream()`
  Provides access to the `ServletInputStream` for reading data from the client.
  `protected Log`
  `getLog()`
  `ServletOutputStream`
  `getOutputStream()`
  Provides access to the `ServletOutputStream` for writing data to the client.
  `boolean`
  `hasAsyncIO()`
  `void`
  `pause()`
  Informs the processor that the underlying I/O layer has stopped accepting new connections.
  `final void`
  `setSslSupport(SSLSupport sslSupport)`
  Set the SSL information for this HTTP connection.
  `void`
  `timeoutAsync(long now)`
  Check this processor to see if the timeout has expired and process a timeout if that is that case.

  ### Methods inherited from class UpgradeProcessorBase

  `asyncPostProcess, checkAsyncTimeoutGeneration, getLeftoverInput, getRequest, getUpgradeToken, isAsync, isUpgrade, recycle, service`

  ### Methods inherited from class AbstractProcessorLight

  `addDispatch, clearDispatches, getIteratorAndClearDispatches, logAccess, process`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### UpgradeProcessorInternal

    public UpgradeProcessorInternal(SocketWrapperBase<?> wrapper, UpgradeToken upgradeToken, UpgradeGroupInfo upgradeGroupInfo)

- ## Method Details

  - ### dispatch

    public AbstractEndpoint.Handler.SocketState dispatch(SocketEvent status)
    Description copied from class: `AbstractProcessorLight`
    Process an in-progress request that is no longer in standard HTTP mode. Uses currently include Servlet 3.0 Async and HTTP upgrade connections. Further uses may be added in the future. These will typically start as HTTP requests.
    Specified by:
      `dispatch` in class `AbstractProcessorLight`
    Parameters:
      `status` - The event to process
    Returns:
      The state the caller should put the socket in when this method returns

  - ### setSslSupport

    public final void setSslSupport(SSLSupport sslSupport)
    Description copied from interface: `Processor`
    Set the SSL information for this HTTP connection.
    Parameters:
      `sslSupport` - The SSL support object to use for this connection

  - ### pause

    public void pause()
    Description copied from interface: `Processor`
    Informs the processor that the underlying I/O layer has stopped accepting new connections. This is primarily intended to enable processors that use multiplexed connections to prevent further 'streams' being added to an existing multiplexed connection.

  - ### getLog

    protected Log getLog()
    Specified by:
      `getLog` in class `AbstractProcessorLight`
    Returns:
      the logger associated with this processor type

  - ### timeoutAsync

    public void timeoutAsync(long now)
    Description copied from interface: `Processor`
    Check this processor to see if the timeout has expired and process a timeout if that is that case.

    Note: The name of this method originated with the Servlet 3.0 asynchronous processing but evolved over time to represent a timeout that is triggered independently of the socket read/write timeouts.

    Specified by:
      `timeoutAsync` in interface `Processor`
    Overrides:
      `timeoutAsync` in class `UpgradeProcessorBase`
    Parameters:
      `now` - The time (as returned by `System.currentTimeMillis()`) to use as the current time to determine whether the timeout has expired. If negative, the timeout will always be treated as if it has expired.

  - ### hasAsyncIO

    public boolean hasAsyncIO()

  - ### close

    public void close() throws Exception
    Throws:
      `Exception`

  - ### getInputStream

    public ServletInputStream getInputStream() throws IOException
    Description copied from interface: `jakarta.servlet.http.WebConnection`
    Provides access to the `ServletInputStream` for reading data from the client.
    Returns:
      the input stream
    Throws:
      `IOException` - If an I/O occurs while obtaining the stream

  - ### getOutputStream

    public ServletOutputStream getOutputStream() throws IOException
    Description copied from interface: `jakarta.servlet.http.WebConnection`
    Provides access to the `ServletOutputStream` for writing data to the client.
    Returns:
      the output stream
    Throws:
      `IOException` - If an I/O occurs while obtaining the stream