Class ConnectionHandler

  • All Implemented Interfaces:
    org.apache.qpid.proton.engine.CoreHandler, org.apache.qpid.proton.engine.Handler
    Direct Known Subclasses:
    WebSocketConnectionHandler

    public class ConnectionHandler
    extends org.apache.qpid.proton.engine.BaseHandler
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ConnectionHandler​(AmqpConnection amqpConnection, String connectionId, org.apache.qpid.proton.engine.SslDomain.VerifyMode verifyMode)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addTransportLayers​(org.apache.qpid.proton.engine.Event event, org.apache.qpid.proton.engine.impl.TransportInternal transport)  
      protected AmqpConnection getAmqpConnection()  
      protected int getMaxFrameSize()  
      protected int getProtocolPort()
      Port used on connection open frame
      String getRemoteHostName()
      HostName to be used for socket creation.
      protected int getRemotePort()
      port used to create socket.
      protected void notifyTransportErrors​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionBound​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionFinal​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionInit​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionLocalClose​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionLocalOpen​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionRemoteClose​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionRemoteOpen​(org.apache.qpid.proton.engine.Event event)  
      void onConnectionUnbound​(org.apache.qpid.proton.engine.Event event)  
      void onTransportClosed​(org.apache.qpid.proton.engine.Event event)  
      void onTransportError​(org.apache.qpid.proton.engine.Event event)  
      • Methods inherited from class org.apache.qpid.proton.engine.BaseHandler

        add, children, getHandler, getHandler, handle, onDelivery, onLinkFinal, onLinkFlow, onLinkInit, onLinkLocalClose, onLinkLocalDetach, onLinkLocalOpen, onLinkRemoteClose, onLinkRemoteDetach, onLinkRemoteOpen, onReactorFinal, onReactorInit, onReactorQuiesced, onSelectableError, onSelectableExpired, onSelectableFinal, onSelectableInit, onSelectableReadable, onSelectableUpdated, onSelectableWritable, onSessionFinal, onSessionInit, onSessionLocalClose, onSessionLocalOpen, onSessionRemoteClose, onSessionRemoteOpen, onTimerTask, onTransport, onTransportHeadClosed, onTransportTailClosed, onUnhandled, setHandler, setHandler
    • Constructor Detail

      • ConnectionHandler

        protected ConnectionHandler​(AmqpConnection amqpConnection,
                                    String connectionId,
                                    org.apache.qpid.proton.engine.SslDomain.VerifyMode verifyMode)
    • Method Detail

      • onConnectionInit

        public void onConnectionInit​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionInit in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionInit in class org.apache.qpid.proton.engine.BaseHandler
      • addTransportLayers

        protected void addTransportLayers​(org.apache.qpid.proton.engine.Event event,
                                          org.apache.qpid.proton.engine.impl.TransportInternal transport)
      • notifyTransportErrors

        protected void notifyTransportErrors​(org.apache.qpid.proton.engine.Event event)
      • getRemoteHostName

        public String getRemoteHostName()
        HostName to be used for socket creation. for ex: in case of proxy server - this could be proxy ip address
        Returns:
        host name
      • getRemotePort

        protected int getRemotePort()
        port used to create socket. for ex: in case of talking to event hubs service via proxy - use proxy port
        Returns:
        port
      • getProtocolPort

        protected int getProtocolPort()
        Port used on connection open frame
        Returns:
        port
      • getMaxFrameSize

        protected int getMaxFrameSize()
      • onConnectionBound

        public void onConnectionBound​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionBound in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionBound in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionUnbound

        public void onConnectionUnbound​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionUnbound in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionUnbound in class org.apache.qpid.proton.engine.BaseHandler
      • onTransportError

        public void onTransportError​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onTransportError in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onTransportError in class org.apache.qpid.proton.engine.BaseHandler
      • onTransportClosed

        public void onTransportClosed​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onTransportClosed in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onTransportClosed in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionLocalOpen

        public void onConnectionLocalOpen​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionLocalOpen in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionLocalOpen in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionRemoteOpen

        public void onConnectionRemoteOpen​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionRemoteOpen in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionRemoteOpen in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionLocalClose

        public void onConnectionLocalClose​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionLocalClose in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionLocalClose in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionRemoteClose

        public void onConnectionRemoteClose​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionRemoteClose in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionRemoteClose in class org.apache.qpid.proton.engine.BaseHandler
      • onConnectionFinal

        public void onConnectionFinal​(org.apache.qpid.proton.engine.Event event)
        Specified by:
        onConnectionFinal in interface org.apache.qpid.proton.engine.CoreHandler
        Overrides:
        onConnectionFinal in class org.apache.qpid.proton.engine.BaseHandler