Class NegotiatingServerConnection

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Connection

    public abstract class NegotiatingServerConnection
    extends AbstractConnection
    • Field Detail

      • LOG

        private static final Logger LOG
      • connector

        private final Connector connector
      • engine

        private final javax.net.ssl.SSLEngine engine
      • protocols

        private final java.util.List<java.lang.String> protocols
      • defaultProtocol

        private final java.lang.String defaultProtocol
      • protocol

        private java.lang.String protocol
    • Constructor Detail

      • NegotiatingServerConnection

        protected NegotiatingServerConnection​(Connector connector,
                                              EndPoint endPoint,
                                              javax.net.ssl.SSLEngine engine,
                                              java.util.List<java.lang.String> protocols,
                                              java.lang.String defaultProtocol)
    • Method Detail

      • getProtocols

        public java.util.List<java.lang.String> getProtocols()
      • getDefaultProtocol

        public java.lang.String getDefaultProtocol()
      • getConnector

        public Connector getConnector()
      • getSSLEngine

        public javax.net.ssl.SSLEngine getSSLEngine()
      • getProtocol

        public java.lang.String getProtocol()
      • setProtocol

        protected void setProtocol​(java.lang.String protocol)
      • onOpen

        public void onOpen()
        Description copied from interface: Connection

        Callback method invoked when this connection is opened.

        Creators of the connection implementation are responsible for calling this method.

        Specified by:
        onOpen in interface Connection
        Overrides:
        onOpen in class AbstractConnection
      • fill

        private int fill()
      • close

        public void close()
        Description copied from interface: Connection

        Performs a logical close of this connection.

        For simple connections, this may just mean to delegate the close to the associated EndPoint but, for example, SSL connections should write the SSL close message before closing the associated EndPoint.

        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface Connection
        Overrides:
        close in class AbstractConnection