protected class ServerConnector.ServerConnectorManager extends SelectorManager
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerDEFAULT_CONNECT_TIMEOUT, LOG| Constructor and Description |
|---|
ServerConnectorManager(Executor executor,
Scheduler scheduler,
int selectors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
accepted(SocketChannel channel)
Callback method when a channel is accepted from the
ServerSocketChannel
passed to SelectorManager.acceptor(ServerSocketChannel). |
protected void |
endPointClosed(EndPoint endpoint)
Callback method invoked when an endpoint is closed.
|
protected void |
endPointOpened(EndPoint endpoint)
Callback method invoked when an endpoint is opened.
|
Connection |
newConnection(SocketChannel channel,
EndPoint endpoint,
Object attachment)
Factory method to create
Connection. |
protected SelectChannelEndPoint |
newEndPoint(SocketChannel channel,
ManagedSelector selectSet,
SelectionKey selectionKey)
Factory method to create
EndPoint. |
accept, accept, acceptor, connect, connectionClosed, connectionFailed, connectionOpened, doStart, doStop, dump, dump, execute, finishConnect, getConnectTimeout, getExecutor, getScheduler, getSelectorCount, getSelectorPriorityDelta, newSelector, setConnectTimeout, setSelectorPriorityDeltaaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopprotected void accepted(SocketChannel channel) throws IOException
SelectorManagerServerSocketChannel
passed to SelectorManager.acceptor(ServerSocketChannel).
The default impl throws an UnsupportedOperationException, so it must
be overridden by subclasses if a server channel is provided.accepted in class SelectorManagerchannel - theIOException - if unable to accept channelprotected SelectChannelEndPoint newEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey selectionKey) throws IOException
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 endpointselectSet - the selector the channel is registered toselectionKey - the selection keyIOException - if the endPoint cannot be createdSelectorManager.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 attachmentIOException - if unable to create new connectionSelectorManager.newEndPoint(SocketChannel, ManagedSelector, SelectionKey)protected void endPointOpened(EndPoint endpoint)
SelectorManagerCallback method invoked when an endpoint is opened.
endPointOpened in class SelectorManagerendpoint - the endpoint being openedprotected void endPointClosed(EndPoint endpoint)
SelectorManagerCallback method invoked when an endpoint is closed.
endPointClosed in class SelectorManagerendpoint - the endpoint being closedCopyright © 1995–2015 Mort Bay Consulting. All rights reserved.