protected class HttpClient.ClientSelectorManager extends SelectorManager
SelectorManager.ManagedSelector, SelectorManager.SelectableEndPointAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerDEFAULT_CONNECT_TIMEOUT, LOG| Constructor and Description |
|---|
HttpClient.ClientSelectorManager(Executor executor,
Scheduler scheduler) |
HttpClient.ClientSelectorManager(Executor executor,
Scheduler scheduler,
int selectors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectionFailed(SocketChannel channel,
Throwable ex,
Object attachment)
Callback method invoked when a non-blocking connect cannot be completed.
|
Connection |
newConnection(SocketChannel channel,
EndPoint endPoint,
Object attachment)
Factory method to create
Connection. |
protected EndPoint |
newEndPoint(SocketChannel channel,
SelectorManager.ManagedSelector selector,
SelectionKey key)
Factory method to create
EndPoint. |
accept, connect, connectionClosed, connectionOpened, doStart, doStop, dump, dump, endPointClosed, endPointOpened, execute, finishConnect, getConnectTimeout, getExecutor, getScheduler, getSelectorCount, newSelector, setConnectTimeoutaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stoppublic HttpClient.ClientSelectorManager(Executor executor, Scheduler scheduler)
protected EndPoint newEndPoint(SocketChannel channel, SelectorManager.ManagedSelector selector, SelectionKey key)
SelectorManagerFactory method to create EndPoint.
This method is invoked as a result of the registration of a channel via SelectorManager.connect(SocketChannel, Object)
or SelectorManager.accept(SocketChannel).
newEndPoint in class SelectorManagerchannel - the channel associated to the endpointselector - the selector the channel is registered tokey - the selection keySelectorManager.newConnection(SocketChannel, EndPoint, Object)public Connection newConnection(SocketChannel channel, EndPoint endPoint, Object attachment) throws IOException
SelectorManagerFactory method to create Connection.
newConnection in class SelectorManagerchannel - the channel associated to the connectionendPoint - the endpointattachment - the attachmentIOExceptionSelectorManager.newEndPoint(SocketChannel, ManagedSelector, SelectionKey)protected void connectionFailed(SocketChannel channel, Throwable ex, Object attachment)
SelectorManagerCallback method invoked when a non-blocking connect cannot be completed.
By default it just logs with level warning.
connectionFailed in class SelectorManagerchannel - the channel that attempted the connectex - the exception that caused the connect to failattachment - the attachment object associated at registrationCopyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.