Class AbstractAmqCommand

    • Constructor Detail

      • AbstractAmqCommand

        public AbstractAmqCommand()
    • Method Detail

      • createConnection

        protected Connection createConnection()
                                       throws JMSException
        Establishes a connection to the remote broker specified by the broker url.
        Returns:
        - connection to the broker
        Throws:
        JMSException
      • createConnection

        protected Connection createConnection​(String username,
                                              String password)
                                       throws JMSException
        Establishes a connection to the remote broker specified by the broker url.
        Parameters:
        username - - username for the connection
        password - - password for the connection
        Returns:
        - connection to the broker
        Throws:
        JMSException
      • closeAllConnections

        protected void closeAllConnections()
        Close all created connections.
      • setBrokerUrl

        protected void setBrokerUrl​(URI brokerUrl)
        Set the broker url.
        Parameters:
        brokerUrl - - new broker url
      • getBrokerUrl

        protected URI getBrokerUrl()
        Get the current broker url.
        Returns:
        current broker url
      • getConnectionFactory

        public ConnectionFactory getConnectionFactory()
        Returns:
        the factory
      • getUsername

        public String getUsername()
        Returns:
        the username
      • setFactory

        public void setFactory​(ConnectionFactory factory)
        Parameters:
        factory - the factory to set
      • setUsername

        public void setUsername​(String username)
        Parameters:
        username - the username to set
      • getPassword

        public String getPassword()
        Returns:
        the password
      • setPassword

        public void setPassword​(String password)
        Parameters:
        password - the password to set
      • getPasswordFactory

        public PasswordFactory getPasswordFactory()
        Returns:
        the passwordFactory
      • setPasswordFactory

        public void setPasswordFactory​(PasswordFactory passwordFactory)
        Parameters:
        passwordFactory - the passwordFactory to set