Class QpidServiceImpl

java.lang.Object
org.wso2.carbon.andes.service.QpidServiceImpl
All Implemented Interfaces:
QpidService

public class QpidServiceImpl extends Object implements QpidService
The following class contains mutator methods for configuration values the broker.
  • Field Details

    • QPID_CONF

      public static final String QPID_CONF
      The location for the qpid configuration file directory.
      See Also:
  • Constructor Details

    • QpidServiceImpl

      public QpidServiceImpl(String accessKey)
      Creates a new Qpid Service.
      Parameters:
      accessKey - The access key for in VM connection string.
  • Method Details

    • loadConfigurations

      public void loadConfigurations()
      Read configuration files and set ports and host names
    • getAccessKey

      public String getAccessKey()
      Get the access key that should be used for internal authentication. The access key is generated when the authentication bundle is activated and published with the AuthenticationService
      Specified by:
      getAccessKey in interface QpidService
      Returns:
      Access key
    • getClientID

      public String getClientID()
      Get client id (machine name) that is used to connect to the broker
      Specified by:
      getClientID in interface QpidService
      Returns:
      Client ID
    • getVirtualHostName

      public String getVirtualHostName()
      Get default virtual host name of the broker
      Specified by:
      getVirtualHostName in interface QpidService
      Returns:
      Default virtual host name
    • getHostname

      public String getHostname()
      Get hostname of the machine that broker (i.e.Carbon) runs on
      Specified by:
      getHostname in interface QpidService
      Returns:
      Carbon hostname
    • getAMQPPort

      public Integer getAMQPPort()
      Specified by:
      getAMQPPort in interface QpidService
    • setAMQPPort

      public void setAMQPPort(Integer amqpPort)
      Specified by:
      setAMQPPort in interface QpidService
    • getAMQPSSLPort

      public Integer getAMQPSSLPort()
      Specified by:
      getAMQPSSLPort in interface QpidService
    • setAMQPSSLPort

      public void setAMQPSSLPort(Integer amqpSSLPort)
      Specified by:
      setAMQPSSLPort in interface QpidService
    • getMqttPort

      public Integer getMqttPort()
      Specified by:
      getMqttPort in interface QpidService
    • setMqttPort

      public void setMqttPort(Integer mqttPort)
      Specified by:
      setMqttPort in interface QpidService
    • getMqttSSLPort

      public Integer getMqttSSLPort()
      Specified by:
      getMqttSSLPort in interface QpidService
    • setMqttSSLPort

      public void setMqttSSLPort(Integer mqttSSLPort)
      Specified by:
      setMqttSSLPort in interface QpidService
    • getInVMConnectionURL

      public String getInVMConnectionURL(String username)
      Get In-VM AMQP connection URL for internal components
      Specified by:
      getInVMConnectionURL in interface QpidService
      Parameters:
      username - Authentication user
      Returns:
      Internal AMQP connection URL
    • getTCPConnectionURL

      public String getTCPConnectionURL(String username, String password)
      Get AMQP connection URL for external applications
      Specified by:
      getTCPConnectionURL in interface QpidService
      Parameters:
      username - Authentication username
      password - Authentication password
      Returns:
      External AMQP connection URL
    • getTCPConnectionURL

      public String getTCPConnectionURL(String username, String password, String clientID)
      Get AMQP connection URL for external applications
      Specified by:
      getTCPConnectionURL in interface QpidService
      Parameters:
      username - Authentication username
      password - Authentication password
      clientID - Owner name
      Returns:
      External AMQP connection URL
    • getInternalTCPConnectionURL

      public String getInternalTCPConnectionURL(String username, String password)
      Get AMQP connection URL for internal applications
      Specified by:
      getInternalTCPConnectionURL in interface QpidService
      Parameters:
      username - Authentication username
      password - Authentication password
      Returns:
      External AMQP connection URL
    • getInternalTCPConnectionURL

      public String getInternalTCPConnectionURL(String username, String password, String clientID)
      Get AMQP connection URL for internal applications
      Specified by:
      getInternalTCPConnectionURL in interface QpidService
      Parameters:
      username - Authentication username
      password - Authentication password
      clientID - Owner name
      Returns:
      External AMQP connection URL
    • getQpidHome

      public String getQpidHome()
      Get Qpid home directory
      Specified by:
      getQpidHome in interface QpidService
      Returns:
      Absolute path to the location where Qpid configuration files reside
    • getQueues

      public org.wso2.carbon.andes.commons.QueueDetails[] getQueues(boolean isDurable)
      Get details about all queues (durable/non-durable) created in the broker
      Specified by:
      getQueues in interface QpidService
      Parameters:
      isDurable - Durable queues?
      Returns:
      An array of QueueDetails objects
    • getSubscriptions

      public org.wso2.carbon.andes.commons.SubscriptionDetails[] getSubscriptions(String topic, boolean isDurable)
      Get details about all subscriptions (durable/non-durable) created in the broker
      Specified by:
      getSubscriptions in interface QpidService
      Parameters:
      topic - Name of the topic that subscriptions bound to
      isDurable - Durable subscriptions?
      Returns:
    • getMQTTSSLOnly

      public boolean getMQTTSSLOnly() throws ConfigurationException
      Returns true if SSL port enabled and default port disabled.
      Returns:
      if only port enabled is SSL port
      Throws:
      ConfigurationException
    • getIfSSLOnly

      public boolean getIfSSLOnly() throws ConfigurationException
      Return if option is enabled for embedded-qpid
      Specified by:
      getIfSSLOnly in interface QpidService
      Returns:
      Throws:
      ConfigurationException
    • registerBrokerLifecycleListener

      public void registerBrokerLifecycleListener(BrokerLifecycleListener brokerLifecycleListener)
      Register broker lifecycle listener.
      Specified by:
      registerBrokerLifecycleListener in interface QpidService
      Parameters:
      brokerLifecycleListener -