protected abstract static class AbstractProtocol.AbstractConnectionHandler<S,P extends Processor<S>> extends Object implements AbstractEndpoint.Handler
AbstractEndpoint.Handler.SocketState
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<S,Processor<S>> |
connections |
protected RequestGroupInfo |
global |
protected AbstractProtocol.RecycledProcessors<P,S> |
recycledProcessors |
protected AtomicLong |
registerCount |
Modifier | Constructor and Description |
---|---|
protected |
AbstractProtocol.AbstractConnectionHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract P |
createProcessor() |
protected abstract Processor<S> |
createUpgradeProcessor(SocketWrapper<S> socket,
HttpUpgradeHandler httpUpgradeProcessor) |
Object |
getGlobal()
Obtain the GlobalRequestProcessor associated with the handler.
|
protected abstract Log |
getLog() |
protected abstract AbstractProtocol<S> |
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) |
protected final RequestGroupInfo global
protected final AtomicLong registerCount
protected final ConcurrentHashMap<S,Processor<S>> connections
protected final AbstractProtocol.RecycledProcessors<P extends Processor<S>,S> recycledProcessors
protected AbstractProtocol.AbstractConnectionHandler()
protected abstract Log getLog()
protected abstract AbstractProtocol<S> getProtocol()
public Object getGlobal()
AbstractEndpoint.Handler
getGlobal
in interface AbstractEndpoint.Handler
public void recycle()
AbstractEndpoint.Handler
recycle
in interface AbstractEndpoint.Handler
public AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> wrapper, SocketStatus status)
protected abstract P createProcessor()
protected abstract void initSsl(SocketWrapper<S> socket, Processor<S> processor)
protected abstract void longPoll(SocketWrapper<S> socket, Processor<S> processor)
protected abstract void release(SocketWrapper<S> socket, Processor<S> processor, boolean socketClosing, boolean addToPoller)
protected abstract Processor<S> createUpgradeProcessor(SocketWrapper<S> socket, HttpUpgradeHandler httpUpgradeProcessor) throws IOException
IOException
protected void register(AbstractProcessor<S> processor)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.