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
Modifier and TypeClassDescriptionprotected class
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.Graceful
Graceful.Shutdown, Graceful.ThrowingRunnable
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
Fields inherited from class org.eclipse.jetty.server.AbstractConnector
LOG
-
Constructor Summary
ConstructorDescriptionUnixDomainServerConnector
(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 void
accept
(int acceptorID) protected void
configure
(SocketChannel channel) protected void
doStart()
Starts the managed lifecycle beans in the order they were added.protected void
doStop()
Stops the managed lifecycle beans in the reverse order they were added.int
int
int
Get the underlying socket, channel, buffer etc.boolean
protected SelectorManager
newSelectorManager
(Executor executor, Scheduler scheduler, int selectors) void
setAcceptedReceiveBufferSize
(int acceptedReceiveBufferSize) void
setAcceptedSendBufferSize
(int acceptedSendBufferSize) void
setAccepting
(boolean accepting) void
setAcceptQueueSize
(int acceptQueueSize) void
setInheritChannel
(boolean inheritChannel) void
setUnixDomainPath
(Path unixDomainPath) toString()
Methods inherited from class org.eclipse.jetty.server.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, shutdown
Methods inherited from class org.eclipse.jetty.util.component.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, 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
addBean, addBean, addEventListener, getBean, getBeans, getBeans, getCachedBeans, getContainedBeans, getEventListeners, isManaged, manage, removeBean, removeEventListener, unmanage
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
Methods inherited from interface org.eclipse.jetty.util.component.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:ContainerLifeCycle
Starts the managed lifecycle beans in the order they were added.- Overrides:
doStart
in classAbstractConnector
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-
doStop
Description copied from class:ContainerLifeCycle
Stops the managed lifecycle beans in the reverse order they were added.- Overrides:
doStop
in classAbstractConnector
- Throws:
Exception
- If there was a problem stopping. Will cause a transition to FAILED state
-
accept
- Specified by:
accept
in classAbstractConnector
- Throws:
IOException
-
configure
- Throws:
IOException
-
getTransport
Description copied from interface:Connector
Get the underlying socket, channel, buffer etc. for the connector..- Returns:
- the underlying socket, channel, buffer etc. for the connector.
-
setAccepting
public void setAccepting(boolean accepting) - Overrides:
setAccepting
in classAbstractConnector
-
toString
- Overrides:
toString
in classAbstractConnector
-