Package org.eclipse.jetty.unixsocket
Class UnixSocketConnector.UnixSocketConnectorManager
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.io.SelectorManager
-
- org.eclipse.jetty.unixsocket.UnixSocketConnector.UnixSocketConnectorManager
-
- All Implemented Interfaces:
Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
- Enclosing class:
- UnixSocketConnector
protected class UnixSocketConnector.UnixSocketConnectorManager extends SelectorManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.io.SelectorManager
SelectorManager.AcceptListener
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
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
Constructors Constructor Description UnixSocketConnectorManager(java.util.concurrent.Executor executor, Scheduler scheduler, int selectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccepted(java.nio.channels.SelectableChannel channel)Callback method when a channel is accepted from theServerSocketChannelpassed toSelectorManager.acceptor(SelectableChannel).protected java.nio.channels.SelectableChanneldoAccept(java.nio.channels.SelectableChannel server)protected booleandoFinishConnect(java.nio.channels.SelectableChannel channel)protected voidendPointClosed(EndPoint endpoint)Callback method invoked when an endpoint is closed.protected voidendPointOpened(EndPoint endpoint)Callback method invoked when an endpoint is opened.protected booleanisConnectionPending(java.nio.channels.SelectableChannel channel)ConnectionnewConnection(java.nio.channels.SelectableChannel channel, EndPoint endpoint, java.lang.Object attachment)Factory method to createConnection.protected EndPointnewEndPoint(java.nio.channels.SelectableChannel channel, ManagedSelector selector, java.nio.channels.SelectionKey selectionKey)Factory method to createEndPoint.protected java.nio.channels.SelectornewSelector()-
Methods inherited from class org.eclipse.jetty.io.SelectorManager
accept, accept, acceptor, addAcceptListener, addEventListener, connect, connectionClosed, connectionFailed, connectionOpened, doStart, doStop, execute, getConnectTimeout, getExecutor, getReservedThreads, getScheduler, getSelectorCount, newSelector, onAccepted, onAcceptFailed, onAccepting, removeAcceptListener, removeEventListener, setConnectTimeout, setReservedThreads
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
-
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.Dumpable.DumpableContainer
isDumpable
-
-
-
-
Constructor Detail
-
UnixSocketConnectorManager
public UnixSocketConnectorManager(java.util.concurrent.Executor executor, Scheduler scheduler, int selectors)
-
-
Method Detail
-
accepted
protected void accepted(java.nio.channels.SelectableChannel channel) throws java.io.IOExceptionDescription copied from class:SelectorManagerCallback method when a channel is accepted from theServerSocketChannelpassed toSelectorManager.acceptor(SelectableChannel). The default impl throws anUnsupportedOperationException, so it must be overridden by subclasses if a server channel is provided.- Overrides:
acceptedin classSelectorManager- Parameters:
channel- the- Throws:
java.io.IOException- if unable to accept channel
-
newSelector
protected java.nio.channels.Selector newSelector() throws java.io.IOException- Overrides:
newSelectorin classSelectorManager- Throws:
java.io.IOException
-
newEndPoint
protected EndPoint newEndPoint(java.nio.channels.SelectableChannel channel, ManagedSelector selector, java.nio.channels.SelectionKey selectionKey)
Description copied from class:SelectorManagerFactory 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:
newEndPointin classSelectorManager- Parameters:
channel- the channel associated to the endpointselector- the selector the channel is registered toselectionKey- the selection key- Returns:
- a new endpoint
- See Also:
SelectorManager.newConnection(SelectableChannel, EndPoint, Object)
-
newConnection
public Connection newConnection(java.nio.channels.SelectableChannel channel, EndPoint endpoint, java.lang.Object attachment)
Description copied from class:SelectorManagerFactory method to create
Connection.- Specified by:
newConnectionin classSelectorManager- Parameters:
channel- the channel associated to the connectionendpoint- the endpointattachment- the attachment- Returns:
- a new connection
-
endPointOpened
protected void endPointOpened(EndPoint endpoint)
Description copied from class:SelectorManagerCallback method invoked when an endpoint is opened.
- Overrides:
endPointOpenedin classSelectorManager- Parameters:
endpoint- the endpoint being opened
-
endPointClosed
protected void endPointClosed(EndPoint endpoint)
Description copied from class:SelectorManagerCallback method invoked when an endpoint is closed.
- Overrides:
endPointClosedin classSelectorManager- Parameters:
endpoint- the endpoint being closed
-
doFinishConnect
protected boolean doFinishConnect(java.nio.channels.SelectableChannel channel) throws java.io.IOException- Overrides:
doFinishConnectin classSelectorManager- Throws:
java.io.IOException
-
isConnectionPending
protected boolean isConnectionPending(java.nio.channels.SelectableChannel channel)
- Overrides:
isConnectionPendingin classSelectorManager
-
doAccept
protected java.nio.channels.SelectableChannel doAccept(java.nio.channels.SelectableChannel server) throws java.io.IOException- Overrides:
doAcceptin classSelectorManager- Throws:
java.io.IOException
-
-