Class LiveServerConnection

    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        define serialVersionUID for interoperability
        See Also:
        Constant Field Values
      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • cnxFactory

        private transient com.rabbitmq.client.ConnectionFactory cnxFactory
      • conn

        private transient volatile com.rabbitmq.client.Connection conn
      • port

        private int port
      • password

        private String password
    • Constructor Detail

      • LiveServerConnection

        public LiveServerConnection()
        Starts a connection with a default AMQP server.
      • LiveServerConnection

        public LiveServerConnection​(String name,
                                    String host,
                                    int port,
                                    String user,
                                    String password)
        Starts a connection with a server accessible via the factory provided.
        Parameters:
        factory - the factory used to access the server.
    • Method Detail

      • startLiveConnection

        public void startLiveConnection()
      • isConnectionOpen

        public boolean isConnectionOpen()
      • getConnection

        public com.rabbitmq.client.Connection getConnection()
      • getConnectionFactory

        public com.rabbitmq.client.ConnectionFactory getConnectionFactory()
      • getMBeanName

        private String getMBeanName()
      • stopLiveConnection

        public void stopLiveConnection()
        Stops maintaining the connection alive with the server.
      • shutdownCompleted

        public void shutdownCompleted​(com.rabbitmq.client.ShutdownSignalException cause)
        Specified by:
        shutdownCompleted in interface com.rabbitmq.client.ShutdownListener
      • getName

        public String getName()