Class 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.LifeCycle

    public class ClientConnector
    extends org.eclipse.jetty.util.component.ContainerLifeCycle
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      protected class  ClientConnector.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
      • Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

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

      Constructors 
      Constructor Description
      ClientConnector()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(java.nio.channels.SocketChannel channel, java.util.Map<java.lang.String,​java.lang.Object> context)  
      protected void configure​(java.nio.channels.SocketChannel channel)  
      void connect​(java.net.SocketAddress address, java.util.Map<java.lang.String,​java.lang.Object> context)  
      protected void connectFailed​(java.lang.Throwable failure, java.util.Map<java.lang.String,​java.lang.Object> context)  
      protected void doStart()  
      protected void doStop()  
      java.net.SocketAddress getBindAddress()  
      ByteBufferPool getByteBufferPool()  
      java.time.Duration getConnectTimeout()  
      java.util.concurrent.Executor getExecutor()  
      java.time.Duration getIdleTimeout()  
      boolean getReuseAddress()  
      org.eclipse.jetty.util.thread.Scheduler getScheduler()  
      int getSelectors()  
      org.eclipse.jetty.util.ssl.SslContextFactory.Client getSslContextFactory()  
      boolean isConnectBlocking()  
      protected EndPoint newEndPoint​(java.nio.channels.SocketChannel channel, ManagedSelector selector, java.nio.channels.SelectionKey selectionKey)  
      protected SelectorManager newSelectorManager()  
      protected org.eclipse.jetty.util.ssl.SslContextFactory.Client newSslContextFactory()  
      void setBindAddress​(java.net.SocketAddress bindAddress)  
      void setByteBufferPool​(ByteBufferPool byteBufferPool)  
      void setConnectBlocking​(boolean connectBlocking)  
      void setConnectTimeout​(java.time.Duration connectTimeout)  
      void setExecutor​(java.util.concurrent.Executor executor)  
      void setIdleTimeout​(java.time.Duration idleTimeout)  
      void setReuseAddress​(boolean reuseAddress)  
      void setScheduler​(org.eclipse.jetty.util.thread.Scheduler scheduler)  
      void setSelectors​(int selectors)  
      void setSslContextFactory​(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
      • 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
      • Methods inherited from interface org.eclipse.jetty.util.component.Container

        getCachedBeans, getEventListeners
      • Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

        dumpSelf
    • 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
    • Constructor Detail

      • ClientConnector

        public ClientConnector()
    • 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)
      • 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:
        doStart in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        java.lang.Exception
      • doStop

        protected void doStop()
                       throws java.lang.Exception
        Overrides:
        doStop in class org.eclipse.jetty.util.component.ContainerLifeCycle
        Throws:
        java.lang.Exception
      • newSslContextFactory

        protected org.eclipse.jetty.util.ssl.SslContextFactory.Client newSslContextFactory()
      • 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)