Package org.apache.activemq.web.config
Class AbstractConfiguration
- java.lang.Object
-
- org.apache.activemq.web.config.AbstractConfiguration
-
- All Implemented Interfaces:
WebConsoleConfiguration
- Direct Known Subclasses:
JNDIConfiguration
,OsgiConfiguration
,SystemPropertiesConfiguration
public abstract class AbstractConfiguration extends Object implements WebConsoleConfiguration
Base class for configurations.
-
-
Constructor Summary
Constructors Constructor Description AbstractConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionFactory
getConnectionFactory()
The connection factory to use for sending/receiving messages.String
getJmxPassword()
Password for the JMX-user.Collection<JMXServiceURL>
getJmxUrls()
The URL to the JMX connectors of the broker.String
getJmxUser()
The user that is used in case of authenticated JMX connections.protected ConnectionFactory
makeConnectionFactory(String jmsUrl, String jmsUser, String jmsPassword)
Creates the ActiveMQ-ConnectionFactory.protected Collection<JMXServiceURL>
makeJmxUrls(String jmxUrls)
Splits the JMX-Url string into a series of JMSServiceURLs.
-
-
-
Method Detail
-
getConnectionFactory
public ConnectionFactory getConnectionFactory()
Description copied from interface:WebConsoleConfiguration
The connection factory to use for sending/receiving messages.- Specified by:
getConnectionFactory
in interfaceWebConsoleConfiguration
- Returns:
- not
null
-
getJmxPassword
public String getJmxPassword()
Description copied from interface:WebConsoleConfiguration
Password for the JMX-user.- Specified by:
getJmxPassword
in interfaceWebConsoleConfiguration
- Returns:
null
if no authentication- See Also:
WebConsoleConfiguration.getJmxUser()
-
getJmxUrls
public Collection<JMXServiceURL> getJmxUrls()
Description copied from interface:WebConsoleConfiguration
The URL to the JMX connectors of the broker. The names of any failover (master-slave configuration) must also be specified.- Specified by:
getJmxUrls
in interfaceWebConsoleConfiguration
- Returns:
- not
null
, must contain at least one entry
-
getJmxUser
public String getJmxUser()
Description copied from interface:WebConsoleConfiguration
The user that is used in case of authenticated JMX connections. The user must be the same for all the brokers.- Specified by:
getJmxUser
in interfaceWebConsoleConfiguration
- Returns:
null
if no authentication should be used.
-
makeConnectionFactory
protected ConnectionFactory makeConnectionFactory(String jmsUrl, String jmsUser, String jmsPassword)
Creates the ActiveMQ-ConnectionFactory.- Parameters:
jmsUrl
- notnull
jmsUser
-null
if no authenticationjmsPassword
-null
is ok- Returns:
- not
null
-
makeJmxUrls
protected Collection<JMXServiceURL> makeJmxUrls(String jmxUrls)
Splits the JMX-Url string into a series of JMSServiceURLs.- Parameters:
jmxUrls
- the JMX-url, multiple URLs are separated by commas.- Returns:
- not
null
, contains at least one element.
-
-