java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.server.AbstractConnector
org.eclipse.jetty.unixsocket.server.UnixSocketConnector
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

@Deprecated(forRemoval=true) @ManagedObject("Connector using UNIX Socket") public class UnixSocketConnector extends org.eclipse.jetty.server.AbstractConnector
Deprecated, for removal: This API element is subject to removal in a future version.
Use UnixDomainServerConnector from the jetty-unixdomain-server module instead (requires Java 16 or later).

A server-side connector for UNIX sockets.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    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
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    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
    UnixSocketConnector(org.eclipse.jetty.server.Server server)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the default configuration.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, int selectors)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given number of selectors
    UnixSocketConnector(org.eclipse.jetty.server.Server server, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given selectors and ConnectionFactories.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, int selectors, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given selectors and SslContextFactory.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, org.eclipse.jetty.io.ByteBufferPool bufferPool, int selectors, org.eclipse.jetty.server.ConnectionFactory... factories)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given parameters.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.server.ConnectionFactory... factories)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given ConnectionFactories.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given SslContextFactory.
    UnixSocketConnector(org.eclipse.jetty.server.Server server, org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory, org.eclipse.jetty.server.ConnectionFactory... factories)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructs a UnixSocketConnector with the given SslContextFactory and ConnectionFactories.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(int acceptorID)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    accepted(jnr.unixsocket.UnixSocketChannel channel)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    org.eclipse.jetty.io.SelectorManager
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected org.eclipse.jetty.unixsocket.common.UnixSocketEndPoint
    newEndPoint(SelectableChannel channel, org.eclipse.jetty.io.ManagedSelector selector, SelectionKey key)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected org.eclipse.jetty.io.SelectorManager
    newSelectorManager(Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, int selectors)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setAcceptQueueSize(int acceptQueueSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    setReuseAddress(boolean reuseAddress)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    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, setAccepting, 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_SOCKET_PATH_LENGTH

      public static final int MAX_UNIX_SOCKET_PATH_LENGTH
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the default configuration.

      Parameters:
      server - the Server this connector will accept connections for.
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("selectors") int selectors)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given number of selectors

      Parameters:
      server - the Server this connector will accept connections for.
      selectors - the number of selectors, or <=0 for a default value.
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("factories") org.eclipse.jetty.server.ConnectionFactory... factories)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given ConnectionFactories.

      Parameters:
      server - the Server this connector will accept connections for.
      factories - zero or more ConnectionFactory instances used to create and configure connections.
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("selectors") int selectors, @Name("factories") org.eclipse.jetty.server.ConnectionFactory... factories)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given selectors and ConnectionFactories.

      Parameters:
      server - the Server this connector will accept connections for.
      selectors - the number of selectors, or <=0 for a default value.
      factories - zero or more ConnectionFactory instances used to create and configure connections.
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("sslContextFactory") org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given SslContextFactory.

      Parameters:
      server - the Server this connector will accept connections for.
      sslContextFactory - when non null a SslConnectionFactory prepended to the other ConnectionFactories
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("selectors") int selectors, @Name("sslContextFactory") org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given selectors and SslContextFactory.

      .
      Parameters:
      server - the Server this connector will accept connections for.
      selectors - the number of selectors, or <=0 for a default value.
      sslContextFactory - when non null a SslConnectionFactory prepended to the other ConnectionFactories
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("sslContextFactory") org.eclipse.jetty.util.ssl.SslContextFactory.Server sslContextFactory, @Name("factories") org.eclipse.jetty.server.ConnectionFactory... factories)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given SslContextFactory and ConnectionFactories.

      .
      Parameters:
      server - the Server this connector will accept connections for.
      sslContextFactory - when non null a SslConnectionFactory prepended to the other ConnectionFactories
      factories - zero or more ConnectionFactory instances used to create and configure connections.
    • UnixSocketConnector

      public UnixSocketConnector(@Name("server") org.eclipse.jetty.server.Server server, @Name("executor") Executor executor, @Name("scheduler") org.eclipse.jetty.util.thread.Scheduler scheduler, @Name("bufferPool") org.eclipse.jetty.io.ByteBufferPool bufferPool, @Name("selectors") int selectors, @Name("factories") org.eclipse.jetty.server.ConnectionFactory... factories)
      Deprecated, for removal: This API element is subject to removal in a future version.

      Constructs a UnixSocketConnector with the given parameters.

      .
      Parameters:
      server - the Server this connector will accept connections for.
      executor - the executor that runs tasks for handling requests, acceptors and selectors.
      scheduler - the scheduler used to schedule timed tasks.
      bufferPool - the ByteBufferPool used to allocate buffers.
      selectors - the number of selectors, or <=0 for a default value.
      factories - zero or more ConnectionFactory instances used to create and configure connections.
  • Method Details

    • getUnixSocket

      @ManagedAttribute("The UNIX socket file name") public String getUnixSocket()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setUnixSocket

      public void setUnixSocket(String filename)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • newSelectorManager

      protected org.eclipse.jetty.io.SelectorManager newSelectorManager(Executor executor, org.eclipse.jetty.util.thread.Scheduler scheduler, int selectors)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • doStart

      protected void doStart() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doStart in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      doStop in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      Exception
    • open

      public void open() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • close

      public void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • accept

      public void accept(int acceptorID) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      accept in class org.eclipse.jetty.server.AbstractConnector
      Throws:
      IOException
    • accepted

      protected void accepted(jnr.unixsocket.UnixSocketChannel channel) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      IOException
    • getSelectorManager

      public org.eclipse.jetty.io.SelectorManager getSelectorManager()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getTransport

      public Object getTransport()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • newEndPoint

      protected org.eclipse.jetty.unixsocket.common.UnixSocketEndPoint newEndPoint(SelectableChannel channel, org.eclipse.jetty.io.ManagedSelector selector, SelectionKey key)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAcceptQueueSize

      @ManagedAttribute("Accept Queue size") public int getAcceptQueueSize()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      the accept queue size
    • setAcceptQueueSize

      public void setAcceptQueueSize(int acceptQueueSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      acceptQueueSize - the accept queue size (also known as accept backlog)
    • getReuseAddress

      @ManagedAttribute("Whether the server socket reuses addresses") public boolean getReuseAddress()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      whether the server socket reuses addresses
      See Also:
    • setReuseAddress

      public void setReuseAddress(boolean reuseAddress)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      reuseAddress - whether the server socket reuses addresses
      See Also:
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class org.eclipse.jetty.server.AbstractConnector