org.apache.activemq.web.config
Class AbstractConfiguration

java.lang.Object
  extended by org.apache.activemq.web.config.AbstractConfiguration
All Implemented Interfaces:
WebConsoleConfiguration
Direct Known Subclasses:
JNDIConfiguration, SystemPropertiesConfiguration

public abstract class AbstractConfiguration
extends java.lang.Object
implements WebConsoleConfiguration

Base class for configurations.

Version:
$Revision: $

Constructor Summary
AbstractConfiguration()
           
 
Method Summary
 javax.jms.ConnectionFactory getConnectionFactory()
          The connection factory to use for sending/receiving messages.
 java.lang.String getJmxPassword()
          Password for the JMX-user.
 java.util.Collection<javax.management.remote.JMXServiceURL> getJmxUrls()
          The URL to the JMX connectors of the broker.
 java.lang.String getJmxUser()
          The user that is used in case of authenticated JMX connections.
protected  javax.jms.ConnectionFactory makeConnectionFactory(java.lang.String jmsUrl, java.lang.String jmsUser, java.lang.String jmsPassword)
          Creates the ActiveMQ-ConnectionFactory.
protected  java.util.Collection<javax.management.remote.JMXServiceURL> makeJmxUrls(java.lang.String jmxUrls)
          Splits the JMX-Url string into a series of JMSServiceURLs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConfiguration

public AbstractConfiguration()
Method Detail

getConnectionFactory

public javax.jms.ConnectionFactory getConnectionFactory()
Description copied from interface: WebConsoleConfiguration
The connection factory to use for sending/receiving messages.

Specified by:
getConnectionFactory in interface WebConsoleConfiguration
Returns:
not null

getJmxPassword

public java.lang.String getJmxPassword()
Description copied from interface: WebConsoleConfiguration
Password for the JMX-user.

Specified by:
getJmxPassword in interface WebConsoleConfiguration
Returns:
null if no authentication
See Also:
WebConsoleConfiguration.getJmxUser()

getJmxUrls

public java.util.Collection<javax.management.remote.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 interface WebConsoleConfiguration
Returns:
not null, must contain at least one entry

getJmxUser

public java.lang.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 interface WebConsoleConfiguration
Returns:
null if no authentication should be used.

makeConnectionFactory

protected javax.jms.ConnectionFactory makeConnectionFactory(java.lang.String jmsUrl,
                                                            java.lang.String jmsUser,
                                                            java.lang.String jmsPassword)
Creates the ActiveMQ-ConnectionFactory.

Parameters:
jmsUrl - not null
jmsUser - null if no authentication
jmsPassword - null is ok
Returns:
not null

makeJmxUrls

protected java.util.Collection<javax.management.remote.JMXServiceURL> makeJmxUrls(java.lang.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.


Copyright © 2005-2012 FuseSource. All Rights Reserved.