protected static class AbstractProtocol.ConnectionHandler<S> extends java.lang.Object implements AbstractEndpoint.Handler<S>
AbstractEndpoint.Handler.SocketState| Constructor and Description |
|---|
ConnectionHandler(AbstractProtocol<S> proto) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getGlobal()
Obtain the GlobalRequestProcessor associated with the handler.
|
protected Log |
getLog() |
java.util.Set<S> |
getOpenSockets()
Obtain the currently open sockets.
|
protected AbstractProtocol<S> |
getProtocol() |
protected void |
longPoll(SocketWrapperBase<?> socket,
Processor processor) |
void |
pause()
Inform the handler that the endpoint has stopped accepting any new
connections.
|
AbstractEndpoint.Handler.SocketState |
process(SocketWrapperBase<S> wrapper,
SocketEvent status)
Process the provided socket with the given current status.
|
void |
recycle()
Recycle resources associated with the handler.
|
protected void |
register(Processor processor) |
void |
release(SocketWrapperBase<S> socketWrapper)
Expected to be used by the Endpoint to release resources on socket
close, errors etc.
|
protected void |
unregister(Processor processor) |
public ConnectionHandler(AbstractProtocol<S> proto)
protected AbstractProtocol<S> getProtocol()
protected Log getLog()
public java.lang.Object getGlobal()
AbstractEndpoint.HandlergetGlobal in interface AbstractEndpoint.Handler<S>public void recycle()
AbstractEndpoint.Handlerrecycle in interface AbstractEndpoint.Handler<S>public AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<S> wrapper, SocketEvent status)
AbstractEndpoint.Handlerprocess in interface AbstractEndpoint.Handler<S>wrapper - The socket to processstatus - The current socket statusprotected void longPoll(SocketWrapperBase<?> socket, Processor processor)
public java.util.Set<S> getOpenSockets()
AbstractEndpoint.HandlergetOpenSockets in interface AbstractEndpoint.Handler<S>public void release(SocketWrapperBase<S> socketWrapper)
release in interface AbstractEndpoint.Handler<S>socketWrapper - The socketWrapper to release resources forprotected void register(Processor processor)
protected void unregister(Processor processor)
public final void pause()
AbstractEndpoint.Handlerpause in interface AbstractEndpoint.Handler<S>Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.