protected static class AbstractProtocol.ConnectionHandler<S> extends Object implements AbstractEndpoint.Handler<S>
AbstractEndpoint.Handler.SocketState
Constructor and Description |
---|
ConnectionHandler(AbstractProtocol<S> proto) |
Modifier and Type | Method and Description |
---|---|
Object |
getGlobal()
Obtain the GlobalRequestProcessor associated with the handler.
|
protected Log |
getLog() |
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 Object getGlobal()
AbstractEndpoint.Handler
getGlobal
in interface AbstractEndpoint.Handler<S>
public void recycle()
AbstractEndpoint.Handler
recycle
in interface AbstractEndpoint.Handler<S>
public AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<S> wrapper, SocketEvent status)
AbstractEndpoint.Handler
process
in interface AbstractEndpoint.Handler<S>
wrapper
- The socket to processstatus
- The current socket statusprotected void longPoll(SocketWrapperBase<?> socket, Processor processor)
public Set<S> getOpenSockets()
AbstractEndpoint.Handler
getOpenSockets
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.Handler
pause
in interface AbstractEndpoint.Handler<S>
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.