AbstractProtocol.ConnectionHandler (Apache Tomcat 11.0.22 API Documentation)
Description: declaration: package: org.apache.coyote, class: AbstractProtocol, class: ConnectionHandler

# Class AbstractProtocol.ConnectionHandler<S>

java.lang.Object
org.apache.coyote.AbstractProtocol.ConnectionHandler<S>

All Implemented Interfaces:
  `AbstractEndpoint.Handler<S>`

Enclosing class:
  `AbstractProtocol<S>`

protected static class AbstractProtocol.ConnectionHandler<S> extends Object implements AbstractEndpoint.Handler<S>

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface AbstractEndpoint.Handler

  `AbstractEndpoint.Handler.SocketState`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConnectionHandler(AbstractProtocol<S> proto)`
  Creates a new connection handler.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getGlobal()`
  Gets the global request processor.
  `protected Log`
  `getLog()`
  Gets the logger.
  `protected AbstractProtocol<S>`
  `getProtocol()`
  Gets the protocol.
  `protected void`
  `longPoll(SocketWrapperBase<?> socket, Processor processor)`
  Performs a long poll on the socket.
  `final void`
  `pause()`
  Pauses all processors.
  `AbstractEndpoint.Handler.SocketState`
  `process(SocketWrapperBase<S> wrapper, SocketEvent status)`
  Processes a socket event.
  `void`
  `recycle()`
  Recycles the handler.
  `protected void`
  `register(Processor processor)`
  Registers a processor.
  `void`
  `release(SocketWrapperBase<S> socketWrapper)`
  Releases the socket wrapper.
  `protected void`
  `unregister(Processor processor)`
  Unregisters a processor.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### ConnectionHandler

    public ConnectionHandler(AbstractProtocol<S> proto)
    Creates a new connection handler.
    Parameters:
      `proto` - The protocol

- ## Method Details

  - ### getProtocol

    protected AbstractProtocol<S> getProtocol()
    Gets the protocol.
    Returns:
      the protocol

  - ### getLog

    protected Log getLog()
    Gets the logger.
    Returns:
      the logger

  - ### getGlobal

    public Object getGlobal()
    Gets the global request processor.
    Specified by:
      `getGlobal` in interface `AbstractEndpoint.Handler<S>`
    Returns:
      the global request processor

  - ### recycle

    public void recycle()
    Recycles the handler.
    Specified by:
      `recycle` in interface `AbstractEndpoint.Handler<S>`

  - ### process

    public AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<S> wrapper, SocketEvent status)
    Processes a socket event.
    Specified by:
      `process` in interface `AbstractEndpoint.Handler<S>`
    Parameters:
      `wrapper` - The socket wrapper
      `status` - The socket event
    Returns:
      the socket state

  - ### longPoll

    protected void longPoll(SocketWrapperBase<?> socket, Processor processor)
    Performs a long poll on the socket.
    Parameters:
      `socket` - The socket wrapper
      `processor` - The processor

  - ### release

    public void release(SocketWrapperBase<S> socketWrapper)
    Releases the socket wrapper.
    Specified by:
      `release` in interface `AbstractEndpoint.Handler<S>`
    Parameters:
      `socketWrapper` - The socket wrapper

  - ### register

    protected void register(Processor processor)
    Registers a processor.
    Parameters:
      `processor` - The processor

  - ### unregister

    protected void unregister(Processor processor)
    Unregisters a processor.
    Parameters:
      `processor` - The processor

  - ### pause

    public final void pause()
    Pauses all processors.
    Specified by:
      `pause` in interface `AbstractEndpoint.Handler<S>`