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:
org.eclipse.jetty.server.Connector, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.Graceful, org.eclipse.jetty.util.component.LifeCycle

@ManagedObject public class UnixDomainServerConnector extends org.eclipse.jetty.server.AbstractConnector

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 Classes
    Modifier and Type
    Class
    Description
    protected class 
     

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Graceful

    org.eclipse.jetty.util.component.Graceful.Shutdown, org.eclipse.jetty.util.component.Graceful.ThrowingRunnable

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class org.eclipse.jetty.server.AbstractConnector

    LOG

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    UnixDomainServerConnector(org.eclipse.jetty.server.Server server, int acceptors, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
     
    UnixDomainServerConnector(org.eclipse.jetty.server.Server server, Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, org.eclipse.jetty.io.ByteBufferPool pool, int acceptors, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
     
    UnixDomainServerConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.ConnectionFactory... factories)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    accept(int acceptorID)
     
    protected void
     
    protected void
     
    protected void
     
    int
     
    int
     
    int
     
     
     
    boolean
     
    protected org.eclipse.jetty.io.SelectorManager
    newSelectorManager(Executor executor, org.eclipse.jetty.util.thread.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)
     
     

    Methods inherited from class org.eclipse.jetty.server.AbstractConnector

    addConnectionFactory, addFirstConnectionFactory, addIfAbsentConnectionFactory, clearConnectionFactories, getAcceptorPriorityDelta, getAcceptors, getByteBufferPool, getConnectedEndPoints, getConnectionFactories, getConnectionFactory, getConnectionFactory, getDefaultConnectionFactory, getDefaultProtocol, getExecutor, getHttpChannelListeners, 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, 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

    dump, dump, dumpSelf

    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

      public UnixDomainServerConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.ConnectionFactory... factories)
    • UnixDomainServerConnector

      public UnixDomainServerConnector(org.eclipse.jetty.server.Server server, int acceptors, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
    • UnixDomainServerConnector

      public UnixDomainServerConnector(org.eclipse.jetty.server.Server server, Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, org.eclipse.jetty.io.ByteBufferPool pool, int acceptors, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
  • Method Details

    • newSelectorManager

      protected org.eclipse.jetty.io.SelectorManager newSelectorManager(Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, int selectors)
    • getUnixDomainPath

      @ManagedAttribute("The Unix-Domain path this connector listens to") public Path getUnixDomainPath()
    • setUnixDomainPath

      public void setUnixDomainPath(Path unixDomainPath)
    • 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)
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      Exception
    • accept

      protected void accept(int acceptorID) throws IOException
      Specified by:
      accept in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      IOException
    • configure

      protected void configure(SocketChannel channel) throws IOException
      Throws:
      IOException
    • getTransport

      public Object getTransport()
    • setAccepting

      public void setAccepting(boolean accepting)
      Overrides:
      setAccepting in class org.eclipse.jetty.server.AbstractConnector
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.jetty.server.AbstractConnector