Package org.wso2.carbon.andes.service
Class QpidServiceImpl
java.lang.Object
org.wso2.carbon.andes.service.QpidServiceImpl
- All Implemented Interfaces:
QpidService
The following class contains mutator methods for configuration values the broker.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the access key that should be used for internal authentication.Get client id (machine name) that is used to connect to the brokerGet hostname of the machine that broker (i.e.Carbon) runs onbooleanReturn ifoption is enabled for embedded-qpid getInternalTCPConnectionURL(String username, String password) Get AMQP connection URL for internal applicationsgetInternalTCPConnectionURL(String username, String password, String clientID) Get AMQP connection URL for internal applicationsgetInVMConnectionURL(String username) Get In-VM AMQP connection URL for internal componentsbooleanReturns true if SSL port enabled and default port disabled.Get Qpid home directoryorg.wso2.carbon.andes.commons.QueueDetails[]getQueues(boolean isDurable) Get details about all queues (durable/non-durable) created in the brokerorg.wso2.carbon.andes.commons.SubscriptionDetails[]getSubscriptions(String topic, boolean isDurable) Get details about all subscriptions (durable/non-durable) created in the brokergetTCPConnectionURL(String username, String password) Get AMQP connection URL for external applicationsgetTCPConnectionURL(String username, String password, String clientID) Get AMQP connection URL for external applicationsGet default virtual host name of the brokervoidRead configuration files and set ports and host namesvoidregisterBrokerLifecycleListener(BrokerLifecycleListener brokerLifecycleListener) Register broker lifecycle listener.voidsetAMQPPort(Integer amqpPort) voidsetAMQPSSLPort(Integer amqpSSLPort) voidsetMqttPort(Integer mqttPort) voidsetMqttSSLPort(Integer mqttSSLPort)
-
Field Details
-
QPID_CONF
The location for the qpid configuration file directory.- See Also:
-
-
Constructor Details
-
QpidServiceImpl
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
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:
getAccessKeyin interfaceQpidService- Returns:
- Access key
-
getClientID
Get client id (machine name) that is used to connect to the broker- Specified by:
getClientIDin interfaceQpidService- Returns:
- Client ID
-
getVirtualHostName
Get default virtual host name of the broker- Specified by:
getVirtualHostNamein interfaceQpidService- Returns:
- Default virtual host name
-
getHostname
Get hostname of the machine that broker (i.e.Carbon) runs on- Specified by:
getHostnamein interfaceQpidService- Returns:
- Carbon hostname
-
getAMQPPort
- Specified by:
getAMQPPortin interfaceQpidService
-
setAMQPPort
- Specified by:
setAMQPPortin interfaceQpidService
-
getAMQPSSLPort
- Specified by:
getAMQPSSLPortin interfaceQpidService
-
setAMQPSSLPort
- Specified by:
setAMQPSSLPortin interfaceQpidService
-
getMqttPort
- Specified by:
getMqttPortin interfaceQpidService
-
setMqttPort
- Specified by:
setMqttPortin interfaceQpidService
-
getMqttSSLPort
- Specified by:
getMqttSSLPortin interfaceQpidService
-
setMqttSSLPort
- Specified by:
setMqttSSLPortin interfaceQpidService
-
getInVMConnectionURL
Get In-VM AMQP connection URL for internal components- Specified by:
getInVMConnectionURLin interfaceQpidService- Parameters:
username- Authentication user- Returns:
- Internal AMQP connection URL
-
getTCPConnectionURL
Get AMQP connection URL for external applications- Specified by:
getTCPConnectionURLin interfaceQpidService- Parameters:
username- Authentication usernamepassword- Authentication password- Returns:
- External AMQP connection URL
-
getTCPConnectionURL
Get AMQP connection URL for external applications- Specified by:
getTCPConnectionURLin interfaceQpidService- Parameters:
username- Authentication usernamepassword- Authentication passwordclientID- Owner name- Returns:
- External AMQP connection URL
-
getInternalTCPConnectionURL
Get AMQP connection URL for internal applications- Specified by:
getInternalTCPConnectionURLin interfaceQpidService- Parameters:
username- Authentication usernamepassword- Authentication password- Returns:
- External AMQP connection URL
-
getInternalTCPConnectionURL
Get AMQP connection URL for internal applications- Specified by:
getInternalTCPConnectionURLin interfaceQpidService- Parameters:
username- Authentication usernamepassword- Authentication passwordclientID- Owner name- Returns:
- External AMQP connection URL
-
getQpidHome
Get Qpid home directory- Specified by:
getQpidHomein interfaceQpidService- 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:
getQueuesin interfaceQpidService- 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:
getSubscriptionsin interfaceQpidService- Parameters:
topic- Name of the topic that subscriptions bound toisDurable- Durable subscriptions?- Returns:
-
getMQTTSSLOnly
Returns true if SSL port enabled and default port disabled.- Returns:
- if only port enabled is SSL port
- Throws:
ConfigurationException
-
getIfSSLOnly
Return ifoption is enabled for embedded-qpid - Specified by:
getIfSSLOnlyin interfaceQpidService- Returns:
- Throws:
ConfigurationException
-
registerBrokerLifecycleListener
Register broker lifecycle listener.- Specified by:
registerBrokerLifecycleListenerin interfaceQpidService- Parameters:
brokerLifecycleListener-
-