Package org.eclipse.jetty.server
Class ServerConnector.ServerConnectorManager
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.io.SelectorManager
org.eclipse.jetty.server.ServerConnector.ServerConnectorManager
- All Implemented Interfaces:
Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
- Enclosing class:
- ServerConnector
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.io.SelectorManager
SelectorManager.AcceptListener, SelectorManager.SelectorManagerListener
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
Fields inherited from class org.eclipse.jetty.io.SelectorManager
DEFAULT_CONNECT_TIMEOUT, LOG
-
Constructor Summary
ConstructorDescriptionServerConnectorManager
(Executor executor, Scheduler scheduler, int selectors) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accepted
(SelectableChannel channel) Callback method when a channel is accepted from theServerSocketChannel
passed toSelectorManager.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.newConnection
(SelectableChannel channel, EndPoint endpoint, Object attachment) Factory method to createConnection
.protected SocketChannelEndPoint
newEndPoint
(SelectableChannel channel, ManagedSelector selector, SelectionKey selectionKey) Factory method to createEndPoint
.toString()
Methods inherited from class org.eclipse.jetty.io.SelectorManager
accept, accept, acceptor, addEventListener, chooseSelector, connect, connectionClosed, connectionFailed, connectionOpened, doAccept, doFinishConnect, doStart, doStop, execute, getConnectTimeout, getExecutor, getScheduler, getSelectorCount, getTotalKeys, isConnectionPending, newSelector, newSelector, onAccepted, onAcceptFailed, onAccepting, removeEventListener, setConnectTimeout
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addManaged, contains, destroy, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeans
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListeners
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
ServerConnectorManager
-
-
Method Details
-
accepted
Description copied from class:SelectorManager
Callback method when a channel is accepted from theServerSocketChannel
passed toSelectorManager.acceptor(SelectableChannel)
. The default impl throws anUnsupportedOperationException
, so it must be overridden by subclasses if a server channel is provided.- Overrides:
accepted
in classSelectorManager
- Parameters:
channel
- the- Throws:
IOException
- if unable to accept channel
-
newEndPoint
protected SocketChannelEndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey selectionKey) throws IOException Description copied from class:SelectorManager
Factory method to create
EndPoint
.This method is invoked as a result of the registration of a channel via
SelectorManager.connect(SelectableChannel, Object)
orSelectorManager.accept(SelectableChannel)
.- Specified by:
newEndPoint
in classSelectorManager
- Parameters:
channel
- the channel associated to the endpointselector
- the selector the channel is registered toselectionKey
- the selection key- Returns:
- a new endpoint
- Throws:
IOException
- if the endPoint cannot be created- See Also:
-
newConnection
public Connection newConnection(SelectableChannel channel, EndPoint endpoint, Object attachment) throws IOException Description copied from class:SelectorManager
Factory method to create
Connection
.- Specified by:
newConnection
in classSelectorManager
- Parameters:
channel
- the channel associated to the connectionendpoint
- the endpointattachment
- the attachment- Returns:
- a new connection
- Throws:
IOException
- if unable to create new connection
-
endPointOpened
Description copied from class:SelectorManager
Callback method invoked when an endpoint is opened.
- Overrides:
endPointOpened
in classSelectorManager
- Parameters:
endpoint
- the endpoint being opened
-
endPointClosed
Description copied from class:SelectorManager
Callback method invoked when an endpoint is closed.
- Overrides:
endPointClosed
in classSelectorManager
- Parameters:
endpoint
- the endpoint being closed
-
toString
- Overrides:
toString
in classSelectorManager
-