protected class ServerConnector.ServerConnectorManager extends SelectorManager
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerDEFAULT_CONNECT_TIMEOUT, LOGFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
ServerConnectorManager(java.util.concurrent.Executor executor,
Scheduler scheduler,
int selectors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
accepted(java.nio.channels.SelectableChannel channel)
Callback method when a channel is accepted from the
ServerSocketChannel
passed to SelectorManager.acceptor(SelectableChannel). |
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(java.nio.channels.SelectableChannel channel,
EndPoint endpoint,
java.lang.Object attachment)
Factory method to create
Connection. |
protected ChannelEndPoint |
newEndPoint(java.nio.channels.SelectableChannel channel,
ManagedSelector selectSet,
java.nio.channels.SelectionKey selectionKey)
Factory method to create
EndPoint. |
java.lang.String |
toString() |
accept, accept, acceptor, connect, connectionClosed, connectionFailed, connectionOpened, doAccept, doFinishConnect, doStart, doStop, execute, getConnectTimeout, getExecutor, getReservedThreads, getScheduler, getSelectorCount, isConnectionPending, newSelector, newSelector, setConnectTimeout, setReservedThreadsaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic ServerConnectorManager(java.util.concurrent.Executor executor,
Scheduler scheduler,
int selectors)
protected void accepted(java.nio.channels.SelectableChannel channel)
throws java.io.IOException
SelectorManagerServerSocketChannel
passed to SelectorManager.acceptor(SelectableChannel).
The default impl throws an UnsupportedOperationException, so it must
be overridden by subclasses if a server channel is provided.accepted in class SelectorManagerchannel - thejava.io.IOException - if unable to accept channelprotected ChannelEndPoint newEndPoint(java.nio.channels.SelectableChannel channel, ManagedSelector selectSet, java.nio.channels.SelectionKey selectionKey) throws java.io.IOException
SelectorManagerFactory method to create EndPoint.
This method is invoked as a result of the registration of a channel via SelectorManager.connect(SelectableChannel, Object)
or SelectorManager.accept(SelectableChannel).
newEndPoint in class SelectorManagerchannel - the channel associated to the endpointselectSet - the selector the channel is registered toselectionKey - the selection keyjava.io.IOException - if the endPoint cannot be createdSelectorManager.newConnection(SelectableChannel, EndPoint, Object)public Connection newConnection(java.nio.channels.SelectableChannel channel, EndPoint endpoint, java.lang.Object attachment) throws java.io.IOException
SelectorManagerFactory method to create Connection.
newConnection in class SelectorManagerchannel - the channel associated to the connectionendpoint - the endpointattachment - the attachmentjava.io.IOException - if unable to create new connectionprotected 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 closedpublic java.lang.String toString()
toString in class java.lang.Object