Class SelectorManager
- All Implemented Interfaces:
Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
SelectorManager manages a number of ManagedSelectors that
simplify the non-blocking primitives provided by the JVM via the java.nio package.
SelectorManager subclasses implement methods to return protocol-specific
EndPoints and Connections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SelectableChannel channel) Deprecated.voidaccept(SelectableChannel channel, Object attachment) Deprecated.Registers a channel to perform non-blocking read/write operations.acceptor(SelectableChannel server) Deprecated.Registers a server channel for accept operations.voidDeprecated.voidaddEventListener(EventListener listener) Deprecated.voidconnect(SelectableChannel channel, Object attachment) Deprecated.Registers a channel to perform a non-blocking connect.voidconnectionClosed(Connection connection) Deprecated.Callback method invoked when a connection is closed.voidconnectionOpened(Connection connection) Deprecated.Callback method invoked when a connection is opened.longDeprecated.Get the connect timeoutDeprecated.intDeprecated.Deprecated.intDeprecated.abstract ConnectionnewConnection(SelectableChannel channel, EndPoint endpoint, Object attachment) Deprecated.Factory method to createConnection.voidDeprecated.voidremoveEventListener(EventListener listener) Deprecated.voidsetConnectTimeout(long milliseconds) Deprecated.Set the connect timeout (in milliseconds)voidsetReservedThreads(int threads) Deprecated.Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Field Details
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUTDeprecated.- See Also:
-
-
Method Details
-
getExecutor
Deprecated. -
getScheduler
Deprecated. -
getConnectTimeout
Deprecated.Get the connect timeout- Returns:
- the connect timeout (in milliseconds)
-
setConnectTimeout
public void setConnectTimeout(long milliseconds) Deprecated.Set the connect timeout (in milliseconds)- Parameters:
milliseconds- the number of milliseconds for the timeout
-
getReservedThreads
Deprecated.- Returns:
- -1
-
setReservedThreads
Deprecated.- Parameters:
threads- ignored
-
getSelectorCount
Deprecated.- Returns:
- the number of selectors in use
-
connect
Deprecated.Registers a channel to perform a non-blocking connect.
The channel must be set in non-blocking mode,
SocketChannel.connect(SocketAddress)must be called prior to calling this method, and the connect operation must not be completed (the return value ofSocketChannel.connect(SocketAddress)must be false).- Parameters:
channel- the channel to registerattachment- the attachment object- See Also:
-
accept
Deprecated.- Parameters:
channel- the channel to accept- See Also:
-
accept
Deprecated.Registers a channel to perform non-blocking read/write operations.
This method is called just after a channel has been accepted by
ServerSocketChannel.accept(), or just after having performed a blocking connect viaSocket.connect(SocketAddress, int), or just after a non-blocking connect viaSocketChannel.connect(SocketAddress)that completed successfully.- Parameters:
channel- the channel to registerattachment- the attachment object
-
acceptor
Deprecated.Registers a server channel for accept operations. When a
SocketChannelis accepted from the givenServerSocketChannelthen theaccepted(SelectableChannel)method is called, which must be overridden by a derivation of this class to handle the accepted channel- Parameters:
server- the server channel to register- Returns:
- A Closable that allows the acceptor to be cancelled
-
connectionOpened
Deprecated.Callback method invoked when a connection is opened.
- Parameters:
connection- the connection just opened
-
connectionClosed
Deprecated.Callback method invoked when a connection is closed.
- Parameters:
connection- the connection just closed
-
newConnection
public abstract Connection newConnection(SelectableChannel channel, EndPoint endpoint, Object attachment) throws IOException Deprecated.Factory method to create
Connection.- Parameters:
channel- the channel associated to the connectionendpoint- the endpointattachment- the attachment- Returns:
- a new connection
- Throws:
IOException- if unable to create new connection
-
addEventListener
Deprecated. -
removeEventListener
Deprecated. -
addAcceptListener
Deprecated. -
removeAcceptListener
Deprecated.
-