@ManagedObject("Connector using UNIX Socket")
public class UnixSocketConnector
extends org.eclipse.jetty.server.AbstractConnector
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
UnixSocketConnector.UnixSocketConnectorManager |
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener| Constructor | Description |
|---|---|
UnixSocketConnector(org.eclipse.jetty.server.Server server) |
HTTP Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
int selectors) |
HTTP Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
int selectors,
org.eclipse.jetty.server.ConnectionFactory... factories) |
HTTP Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
int selectors,
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory) |
HTTP Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
java.util.concurrent.Executor executor,
org.eclipse.jetty.util.thread.Scheduler scheduler,
org.eclipse.jetty.io.ByteBufferPool bufferPool,
int selectors,
org.eclipse.jetty.server.ConnectionFactory... factories) |
Generic Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
org.eclipse.jetty.server.ConnectionFactory... factories) |
Generic Server Connection with default configuration.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory) |
HTTP Server Connection.
|
UnixSocketConnector(org.eclipse.jetty.server.Server server,
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory,
org.eclipse.jetty.server.ConnectionFactory... factories) |
Generic SSL Server Connection.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
accept(int acceptorID) |
|
protected void |
accepted(jnr.unixsocket.UnixSocketChannel channel) |
|
void |
close() |
|
protected void |
doStart() |
|
protected void |
doStop() |
|
int |
getAcceptQueueSize() |
|
boolean |
getReuseAddress() |
|
org.eclipse.jetty.io.SelectorManager |
getSelectorManager() |
|
java.lang.Object |
getTransport() |
|
java.lang.String |
getUnixSocket() |
|
boolean |
isOpen() |
|
protected UnixSocketEndPoint |
newEndPoint(java.nio.channels.SelectableChannel channel,
org.eclipse.jetty.io.ManagedSelector selector,
java.nio.channels.SelectionKey key) |
|
protected org.eclipse.jetty.io.SelectorManager |
newSelectorManager(java.util.concurrent.Executor executor,
org.eclipse.jetty.util.thread.Scheduler scheduler,
int selectors) |
|
void |
open() |
|
void |
setAcceptQueueSize(int acceptQueueSize) |
|
void |
setReuseAddress(boolean reuseAddress) |
|
void |
setUnixSocket(java.lang.String filename) |
|
java.util.concurrent.Future<java.lang.Void> |
shutdown() |
|
java.lang.String |
toString() |
addConnectionFactory, addFirstConnectionFactory, addIfAbsentConnectionFactory, clearConnectionFactories, getAcceptorPriorityDelta, getAcceptors, getByteBufferPool, getConnectedEndPoints, getConnectionFactories, getConnectionFactory, getConnectionFactory, getDefaultConnectionFactory, getDefaultProtocol, getExecutor, getIdleTimeout, getName, getProtocols, getScheduler, getServer, handleAcceptFailure, interruptAcceptors, isAccepting, join, join, onEndPointClosed, onEndPointOpened, removeConnectionFactory, setAccepting, setAcceptorPriorityDelta, setConnectionFactories, setDefaultProtocol, setIdleTimeout, setNameaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopaddBean, addBean, addEventListener, getBean, getBeans, getBeans, getContainedBeans, isManaged, manage, removeBean, removeEventListener, unmanageaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeanspublic UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server)
Construct a ServerConnector with a private instance of HttpConnectionFactory as the only factory.
server - The Server this connector will accept connection for.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("selectors")
int selectors)
Construct a ServerConnector with a private instance of HttpConnectionFactory as the only factory.
server - The Server this connector will accept connection for.selectors - the number of selector threads, or <=0 for a default value. Selectors notice and schedule established connection that can make IO progress.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("selectors")
int selectors,
@Name("factories")
org.eclipse.jetty.server.ConnectionFactory... factories)
Construct a ServerConnector with a private instance of HttpConnectionFactory as the only factory.
server - The Server this connector will accept connection for.selectors - the number of selector threads, or <=0 for a default value. Selectors notice and schedule established connection that can make IO progress.factories - Zero or more ConnectionFactory instances used to create and configure connections.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("factories")
org.eclipse.jetty.server.ConnectionFactory... factories)
Construct a Server Connector with the passed Connection factories.
server - The Server this connector will accept connection for.factories - Zero or more ConnectionFactory instances used to create and configure connections.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("sslContextFactory")
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory)
Construct a ServerConnector with a private instance of HttpConnectionFactory as the primary protocol
server - The Server this connector will accept connection for.sslContextFactory - If non null, then a SslConnectionFactory is instantiated and prepended to the
list of HTTP Connection Factory.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("selectors")
int selectors,
@Name("sslContextFactory")
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory)
Construct a ServerConnector with a private instance of HttpConnectionFactory as the primary protocol
server - The Server this connector will accept connection for.sslContextFactory - If non null, then a SslConnectionFactory is instantiated and prepended to the
list of HTTP Connection Factory.selectors - the number of selector threads, or <=0 for a default value. Selectors notice and schedule established connection that can make IO progress.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("sslContextFactory")
org.eclipse.jetty.util.ssl.SslContextFactory sslContextFactory,
@Name("factories")
org.eclipse.jetty.server.ConnectionFactory... factories)
server - The Server this connector will accept connection for.sslContextFactory - If non null, then a SslConnectionFactory is instantiated and prepended to the
list of ConnectionFactories, with the first factory being the default protocol for the SslConnectionFactory.factories - Zero or more ConnectionFactory instances used to create and configure connections.public UnixSocketConnector(@Name("server")
org.eclipse.jetty.server.Server server,
@Name("executor")
java.util.concurrent.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)
server - The server this connector will be accept connection for.executor - An executor used to run tasks for handling requests, acceptors and selectors.
If null then use the servers executorscheduler - A scheduler used to schedule timeouts. If null then use the servers schedulerbufferPool - A ByteBuffer pool used to allocate buffers. If null then create a private pool with default configuration.selectors - the number of selector threads, or <=0 for a default value(1). Selectors notice and schedule established connection that can make IO progress.factories - Zero or more ConnectionFactory instances used to create and configure connections.@ManagedAttribute public java.lang.String getUnixSocket()
public void setUnixSocket(java.lang.String filename)
protected org.eclipse.jetty.io.SelectorManager newSelectorManager(java.util.concurrent.Executor executor,
org.eclipse.jetty.util.thread.Scheduler scheduler,
int selectors)
protected void doStart()
throws java.lang.Exception
doStart in class org.eclipse.jetty.server.AbstractConnectorjava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class org.eclipse.jetty.server.AbstractConnectorjava.lang.Exceptionpublic boolean isOpen()
public void open()
throws java.io.IOException
java.io.IOExceptionpublic java.util.concurrent.Future<java.lang.Void> shutdown()
shutdown in class org.eclipse.jetty.server.AbstractConnectorpublic void close()
public void accept(int acceptorID)
throws java.io.IOException
accept in class org.eclipse.jetty.server.AbstractConnectorjava.io.IOExceptionprotected void accepted(jnr.unixsocket.UnixSocketChannel channel)
throws java.io.IOException
java.io.IOExceptionpublic org.eclipse.jetty.io.SelectorManager getSelectorManager()
public java.lang.Object getTransport()
protected UnixSocketEndPoint newEndPoint(java.nio.channels.SelectableChannel channel, org.eclipse.jetty.io.ManagedSelector selector, java.nio.channels.SelectionKey key) throws java.io.IOException
java.io.IOException@ManagedAttribute("Accept Queue size")
public int getAcceptQueueSize()
public void setAcceptQueueSize(int acceptQueueSize)
acceptQueueSize - the accept queue size (also known as accept backlog)public boolean getReuseAddress()
ServerSocket.getReuseAddress()public void setReuseAddress(boolean reuseAddress)
reuseAddress - whether the server socket reuses addressesServerSocket.setReuseAddress(boolean)public java.lang.String toString()
toString in class org.eclipse.jetty.server.AbstractConnectorCopyright © 1995–2018 Webtide. All rights reserved.