Class UnixDomainServerConnector
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.AbstractConnector
org.eclipse.jetty.unixdomain.server.UnixDomainServerConnector
- All Implemented Interfaces:
Connector, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, Graceful, LifeCycle
A Connector implementation for Unix-Domain server socket channels.
UnixDomainServerConnector "listens" to a Unix-Domain path
and behaves ServerConnector with respect to acceptors, selectors and connection
factories.
Important: the unix-domain path must be less than 108 bytes. This limit is set by the way Unix-Domain sockets work at the OS level.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classNested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener, AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface Graceful
Graceful.Shutdown, Graceful.ThrowingRunnableNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
FieldsFields inherited from class AbstractConnector
LOG -
Constructor Summary
ConstructorsConstructorDescriptionUnixDomainServerConnector(Server server, int acceptors, int selectors, ConnectionFactory... factories) UnixDomainServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories) UnixDomainServerConnector(Server server, ConnectionFactory... factories) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept(int acceptorID) protected voidconfigure(SocketChannel channel) protected voiddoStart()Starts the managed lifecycle beans in the order they were added.protected voiddoStop()Stops the managed lifecycle beans in the reverse order they were added.intintintGet the underlying socket, channel, buffer etc. for the connector..booleanprotected SelectorManagernewSelectorManager(Executor executor, Scheduler scheduler, int selectors) voidsetAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) voidsetAcceptedSendBufferSize(int acceptedSendBufferSize) voidsetAccepting(boolean accepting) voidsetAcceptQueueSize(int acceptQueueSize) voidsetInheritChannel(boolean inheritChannel) voidsetUnixDomainPath(Path unixDomainPath) toString()Methods inherited from class AbstractConnector
addConnectionFactory, addFirstConnectionFactory, addIfAbsentConnectionFactory, clearConnectionFactories, getAcceptorPriorityDelta, getAcceptors, getByteBufferPool, getConnectedEndPoints, getConnectionFactories, getConnectionFactory, getConnectionFactory, getDefaultConnectionFactory, getDefaultProtocol, getExecutor, getIdleTimeout, getName, getProtocols, getScheduler, getServer, getShutdownIdleTimeout, handleAcceptFailure, interruptAcceptors, isAccepting, isShutdown, join, join, onEndPointClosed, onEndPointOpened, removeConnectionFactory, setAcceptorPriorityDelta, setConnectionFactories, setDefaultProtocol, setIdleTimeout, setName, setShutdownIdleTimeout, shutdownMethods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, installBean, installBean, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Container
addBean, addBean, addEventListener, getBean, getBeans, getBeans, getCachedBeans, getContainedBeans, getEventListeners, isManaged, manage, removeBean, removeEventListener, unmanageMethods inherited from interface Dumpable.DumpableContainer
isDumpableMethods inherited from interface LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stop
-
Field Details
-
MAX_UNIX_DOMAIN_PATH_LENGTH
public static final int MAX_UNIX_DOMAIN_PATH_LENGTH- See Also:
-
-
Constructor Details
-
UnixDomainServerConnector
-
UnixDomainServerConnector
public UnixDomainServerConnector(Server server, int acceptors, int selectors, ConnectionFactory... factories) -
UnixDomainServerConnector
public UnixDomainServerConnector(Server server, Executor executor, Scheduler scheduler, ByteBufferPool bufferPool, int acceptors, int selectors, ConnectionFactory... factories)
-
-
Method Details
-
newSelectorManager
-
getUnixDomainPath
-
setUnixDomainPath
-
isInheritChannel
@ManagedAttribute("Whether this connector uses a server channel inherited from the JVM") public boolean isInheritChannel() -
setInheritChannel
public void setInheritChannel(boolean inheritChannel) -
getAcceptQueueSize
@ManagedAttribute("The accept queue size (backlog) for the server socket") public int getAcceptQueueSize() -
setAcceptQueueSize
public void setAcceptQueueSize(int acceptQueueSize) -
getAcceptedReceiveBufferSize
@ManagedAttribute("The SO_RCVBUF option for accepted sockets") public int getAcceptedReceiveBufferSize() -
setAcceptedReceiveBufferSize
public void setAcceptedReceiveBufferSize(int acceptedReceiveBufferSize) -
getAcceptedSendBufferSize
@ManagedAttribute("The SO_SNDBUF option for accepted sockets") public int getAcceptedSendBufferSize() -
setAcceptedSendBufferSize
public void setAcceptedSendBufferSize(int acceptedSendBufferSize) -
getLocalSocketAddress
-
doStart
Description copied from class:ContainerLifeCycleStarts the managed lifecycle beans in the order they were added.- Overrides:
doStartin classAbstractConnector- Throws:
Exception- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:ContainerLifeCycleStops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStopin classAbstractConnector- Throws:
Exception- If there was a problem stopping. Will cause a transition to FAILED state
-
accept
- Specified by:
acceptin classAbstractConnector- Throws:
IOException
-
configure
- Throws:
IOException
-
getTransport
-
setAccepting
public void setAccepting(boolean accepting) - Overrides:
setAcceptingin classAbstractConnector
-
toString
- Overrides:
toStringin classAbstractConnector
-