Package org.apache.coyote
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 java.lang.Object implements AbstractEndpoint.Handler<S>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tomcat.util.net.AbstractEndpoint.Handler
AbstractEndpoint.Handler.SocketState
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandler(AbstractProtocol<S> proto)Creates a new connection handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetGlobal()Gets the global request processor.protected LoggetLog()Gets the logger.protected AbstractProtocol<S>getProtocol()Gets the protocol.protected voidlongPoll(SocketWrapperBase<?> socket, Processor processor)Performs a long poll on the socket.voidpause()Pauses all processors.AbstractEndpoint.Handler.SocketStateprocess(SocketWrapperBase<S> wrapper, SocketEvent status)Processes a socket event.voidrecycle()Recycles the handler.protected voidregister(Processor processor)Registers a processor.voidrelease(SocketWrapperBase<S> socketWrapper)Releases the socket wrapper.protected voidunregister(Processor processor)Unregisters a processor.
-
-
-
Constructor Detail
-
ConnectionHandler
public ConnectionHandler(AbstractProtocol<S> proto)
Creates a new connection handler.- Parameters:
proto- The protocol
-
-
Method Detail
-
getProtocol
protected AbstractProtocol<S> getProtocol()
Gets the protocol.- Returns:
- the protocol
-
getLog
protected Log getLog()
Gets the logger.- Returns:
- the logger
-
getGlobal
public java.lang.Object getGlobal()
Gets the global request processor.- Specified by:
getGlobalin interfaceAbstractEndpoint.Handler<S>- Returns:
- the global request processor
-
recycle
public void recycle()
Recycles the handler.- Specified by:
recyclein interfaceAbstractEndpoint.Handler<S>
-
process
public AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<S> wrapper, SocketEvent status)
Processes a socket event.- Specified by:
processin interfaceAbstractEndpoint.Handler<S>- Parameters:
wrapper- The socket wrapperstatus- 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 wrapperprocessor- The processor
-
release
public void release(SocketWrapperBase<S> socketWrapper)
Releases the socket wrapper.- Specified by:
releasein interfaceAbstractEndpoint.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:
pausein interfaceAbstractEndpoint.Handler<S>
-
-