- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.io.ClientConnector
-
- All Implemented Interfaces:
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.LifeCycle
public class ClientConnector extends org.eclipse.jetty.util.component.ContainerLifeCycle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classClientConnector.ClientSelectorManager-
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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCLIENT_CONNECTION_FACTORY_CONTEXT_KEYstatic java.lang.StringCLIENT_CONNECTOR_CONTEXT_KEYstatic java.lang.StringCONNECTION_PROMISE_CONTEXT_KEYstatic java.lang.StringREMOTE_SOCKET_ADDRESS_CONTEXT_KEY
-
Constructor Summary
Constructors Constructor Description ClientConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(java.nio.channels.SocketChannel channel, java.util.Map<java.lang.String,java.lang.Object> context)protected voidconfigure(java.nio.channels.SocketChannel channel)voidconnect(java.net.SocketAddress address, java.util.Map<java.lang.String,java.lang.Object> context)protected voidconnectFailed(java.lang.Throwable failure, java.util.Map<java.lang.String,java.lang.Object> context)protected voiddoStart()protected voiddoStop()java.net.SocketAddressgetBindAddress()ByteBufferPoolgetByteBufferPool()java.time.DurationgetConnectTimeout()java.util.concurrent.ExecutorgetExecutor()java.time.DurationgetIdleTimeout()booleangetReuseAddress()org.eclipse.jetty.util.thread.SchedulergetScheduler()intgetSelectors()org.eclipse.jetty.util.ssl.SslContextFactory.ClientgetSslContextFactory()booleanisConnectBlocking()protected EndPointnewEndPoint(java.nio.channels.SocketChannel channel, ManagedSelector selector, java.nio.channels.SelectionKey selectionKey)protected SelectorManagernewSelectorManager()protected org.eclipse.jetty.util.ssl.SslContextFactory.ClientnewSslContextFactory()voidsetBindAddress(java.net.SocketAddress bindAddress)voidsetByteBufferPool(ByteBufferPool byteBufferPool)voidsetConnectBlocking(boolean connectBlocking)voidsetConnectTimeout(java.time.Duration connectTimeout)voidsetExecutor(java.util.concurrent.Executor executor)voidsetIdleTimeout(java.time.Duration idleTimeout)voidsetReuseAddress(boolean reuseAddress)voidsetScheduler(org.eclipse.jetty.util.thread.Scheduler scheduler)voidsetSelectors(int selectors)voidsetSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory.Client sslContextFactory)-
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, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CLIENT_CONNECTOR_CONTEXT_KEY
public static final java.lang.String CLIENT_CONNECTOR_CONTEXT_KEY
- See Also:
- Constant Field Values
-
REMOTE_SOCKET_ADDRESS_CONTEXT_KEY
public static final java.lang.String REMOTE_SOCKET_ADDRESS_CONTEXT_KEY
- See Also:
- Constant Field Values
-
CLIENT_CONNECTION_FACTORY_CONTEXT_KEY
public static final java.lang.String CLIENT_CONNECTION_FACTORY_CONTEXT_KEY
- See Also:
- Constant Field Values
-
CONNECTION_PROMISE_CONTEXT_KEY
public static final java.lang.String CONNECTION_PROMISE_CONTEXT_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getExecutor
public java.util.concurrent.Executor getExecutor()
-
setExecutor
public void setExecutor(java.util.concurrent.Executor executor)
-
getScheduler
public org.eclipse.jetty.util.thread.Scheduler getScheduler()
-
setScheduler
public void setScheduler(org.eclipse.jetty.util.thread.Scheduler scheduler)
-
getByteBufferPool
public ByteBufferPool getByteBufferPool()
-
setByteBufferPool
public void setByteBufferPool(ByteBufferPool byteBufferPool)
-
getSslContextFactory
public org.eclipse.jetty.util.ssl.SslContextFactory.Client getSslContextFactory()
-
setSslContextFactory
public void setSslContextFactory(org.eclipse.jetty.util.ssl.SslContextFactory.Client sslContextFactory)
-
getSelectors
public int getSelectors()
-
setSelectors
public void setSelectors(int selectors)
-
isConnectBlocking
public boolean isConnectBlocking()
-
setConnectBlocking
public void setConnectBlocking(boolean connectBlocking)
-
getConnectTimeout
public java.time.Duration getConnectTimeout()
-
setConnectTimeout
public void setConnectTimeout(java.time.Duration connectTimeout)
-
getIdleTimeout
public java.time.Duration getIdleTimeout()
-
setIdleTimeout
public void setIdleTimeout(java.time.Duration idleTimeout)
-
getBindAddress
public java.net.SocketAddress getBindAddress()
-
setBindAddress
public void setBindAddress(java.net.SocketAddress bindAddress)
-
getReuseAddress
public boolean getReuseAddress()
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress)
-
doStart
protected void doStart() throws java.lang.Exception- Overrides:
doStartin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
java.lang.Exception
-
doStop
protected void doStop() throws java.lang.Exception- Overrides:
doStopin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
java.lang.Exception
-
newSslContextFactory
protected org.eclipse.jetty.util.ssl.SslContextFactory.Client newSslContextFactory()
-
newSelectorManager
protected SelectorManager newSelectorManager()
-
connect
public void connect(java.net.SocketAddress address, java.util.Map<java.lang.String,java.lang.Object> context)
-
accept
public void accept(java.nio.channels.SocketChannel channel, java.util.Map<java.lang.String,java.lang.Object> context)
-
configure
protected void configure(java.nio.channels.SocketChannel channel) throws java.io.IOException- Throws:
java.io.IOException
-
newEndPoint
protected EndPoint newEndPoint(java.nio.channels.SocketChannel channel, ManagedSelector selector, java.nio.channels.SelectionKey selectionKey)
-
connectFailed
protected void connectFailed(java.lang.Throwable failure, java.util.Map<java.lang.String,java.lang.Object> context)
-
-