org.apache.coyote

## Class AbstractProtocol.AbstractConnectionHandler<S,P extends Processor<S>>

- java.lang.Object
- - org.apache.coyote.AbstractProtocol.AbstractConnectionHandler<S,P>

All Implemented Interfaces:
  AbstractEndpoint.Handler

Direct Known Subclasses:
  AbstractAjpProtocol.AbstractAjpConnectionHandler, Http11AprProtocol.Http11ConnectionHandler, Http11NioProtocol.Http11ConnectionHandler, Http11Protocol.Http11ConnectionHandler

Enclosing class:
  AbstractProtocol

    protected abstract static class AbstractProtocol.AbstractConnectionHandler<S,P extends Processor<S>>
    extends Object
    implements AbstractEndpoint.Handler

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.tomcat.util.net.AbstractEndpoint.Handler

`AbstractEndpoint.Handler.SocketState`

### Field Summary

Fields
`protected ConcurrentHashMap<S,Processor<S>>` `connections`
`protected RequestGroupInfo` `global`
`protected AbstractProtocol.RecycledProcessors<P,S>` `recycledProcessors`
`protected AtomicLong` `registerCount`

### Constructor Summary

Constructors
`protected` `AbstractProtocol.AbstractConnectionHandler()`

### Method Summary

Methods
`protected abstract P` `createProcessor()`
`protected abstract Processor<S>` `createUpgradeProcessor(SocketWrapper<S> socket, HttpUpgradeHandler httpUpgradeProcessor)`
`protected abstract Processor<S>` `createUpgradeProcessor(SocketWrapper<S> socket, UpgradeInbound inbound)` Deprecated. Will be removed in Tomcat 8.0.x.
`Object` `getGlobal()` Obtain the GlobalRequestProcessor associated with the handler.
`protected abstract Log` `getLog()`
`protected abstract AbstractProtocol` `getProtocol()`
`protected abstract void` `initSsl(SocketWrapper<S> socket, Processor<S> processor)`
`protected abstract void` `longPoll(SocketWrapper<S> socket, Processor<S> processor)`
`AbstractEndpoint.Handler.SocketState` `process(SocketWrapper<S> wrapper, SocketStatus status)`
`void` `recycle()` Recycle resources associated with the handler.
`protected void` `register(AbstractProcessor<S> processor)`
`protected abstract void` `release(SocketWrapper<S> socket, Processor<S> processor, boolean socketClosing, boolean addToPoller)`
`protected void` `unregister(Processor<S> processor)`

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

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

### Field Detail

#### global

    protected RequestGroupInfo global

#### registerCount

    protected AtomicLong registerCount

#### connections

    protected ConcurrentHashMap<S,Processor<S>> connections

#### recycledProcessors

    protected AbstractProtocol.RecycledProcessors<P extends Processor<S>,S> recycledProcessors

### Constructor Detail

#### AbstractProtocol.AbstractConnectionHandler

    protected AbstractProtocol.AbstractConnectionHandler()

### Method Detail

#### getLog

    protected abstract Log getLog()

#### getProtocol

    protected abstract AbstractProtocol getProtocol()

#### getGlobal

    public Object getGlobal()

Description copied from interface: `AbstractEndpoint.Handler`
Obtain the GlobalRequestProcessor associated with the handler.

Specified by:
  `getGlobal` in interface `AbstractEndpoint.Handler`

#### recycle

    public void recycle()

Description copied from interface: `AbstractEndpoint.Handler`
Recycle resources associated with the handler.

Specified by:
  `recycle` in interface `AbstractEndpoint.Handler`

#### process

    public AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> wrapper,
                                               SocketStatus status)

#### createProcessor

    protected abstract P createProcessor()

#### initSsl

    protected abstract void initSsl(SocketWrapper<S> socket,
               Processor<S> processor)

#### longPoll

    protected abstract void longPoll(SocketWrapper<S> socket,
                Processor<S> processor)

#### release

    protected abstract void release(SocketWrapper<S> socket,
               Processor<S> processor,
               boolean socketClosing,
               boolean addToPoller)

#### createUpgradeProcessor

    @Deprecated
    protected abstract Processor<S> createUpgradeProcessor(SocketWrapper<S> socket,
                                                 UpgradeInbound inbound)
                                                    throws IOException

Deprecated. Will be removed in Tomcat 8.0.x.

Throws:
  `IOException`

#### createUpgradeProcessor

    protected abstract Processor<S> createUpgradeProcessor(SocketWrapper<S> socket,
                                      HttpUpgradeHandler httpUpgradeProcessor)
                                                    throws IOException

Throws:
  `IOException`

#### register

    protected void register(AbstractProcessor<S> processor)

#### unregister

    protected void unregister(Processor<S> processor)