org.mule.transport.jms.integration.activemq
Class ActiveMQJmsConfiguration

java.lang.Object
  extended by org.mule.transport.jms.integration.activemq.ActiveMQJmsConfiguration
All Implemented Interfaces:
NamedObject, ParameterizedConfiguration, JmsVendorConfiguration

public class ActiveMQJmsConfiguration
extends Object
implements JmsVendorConfiguration

Abstracts all the Jms Vendor specific configuration. This is the implementation for ActiveMQ.


Field Summary
static String DEFAULT_BROKER_URL
           
 
Constructor Summary
ActiveMQJmsConfiguration()
           
 
Method Summary
 String getBroadcastDestinationName()
          The test broadcast topic name.
 Connection getConnection(boolean topic, boolean xa)
          Create a connection factory for the Jms profider being tested
 String getDeadLetterDestinationName()
          The test dead letter queue name.
 String getDeadLetterEndpoint()
          Returns the JmsVendorConfiguration.getDeadLetterDestinationName() in the form of an endpoint URI i.e.
 String getInboundDestinationName()
          The test inbound queue name.
 String getInboundEndpoint()
          Returns the JmsVendorConfiguration.getInboundDestinationName() in the form of an endpoint URI i.e.
 String getMiddleDestinationName()
          The test middle queue name.
 String getMiddleEndpoint()
          Returns the JmsVendorConfiguration.getMiddleDestinationName() in the form of an endpoint URI i.e.
 String getName()
           
 String getOutboundDestinationName()
          The test outbound queue name.
 String getOutboundEndpoint()
          Returns the JmsVendorConfiguration.getOutboundDestinationName() in the form of an endpoint URI i.e.
 Map getProperties()
          Any properties returned by this method will be made available for substitution in the XML configuration file(s) for this test case.
 String getProtocol()
          The protocol used for creating endpoints.
 long getSmallTimeout()
          Timeout used when checking that a message is NOT present
 ConnectionFactory getTestConnectionFactory()
           
 long getTimeout()
          The timeout used when waiting for a message to arrive
 String getTopicBroadcastEndpoint()
          Returns the JmsVendorConfiguration.getBroadcastDestinationName() in the form of an endpoint URI i.e.
 void initialise(Class callingClass)
          Perform any needed initialization in this method, such as loading properties from a properties file.
 boolean isEnabled()
          A configuration which is not enabled will be skipped over when running tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BROKER_URL

public static final String DEFAULT_BROKER_URL
See Also:
Constant Field Values
Constructor Detail

ActiveMQJmsConfiguration

public ActiveMQJmsConfiguration()
Method Detail

initialise

public void initialise(Class callingClass)
                throws Exception
Description copied from interface: ParameterizedConfiguration
Perform any needed initialization in this method, such as loading properties from a properties file.

Specified by:
initialise in interface ParameterizedConfiguration
Parameters:
callingClass - is sometimes needed for correct classpath ordering
Throws:
Exception

getConnection

public Connection getConnection(boolean topic,
                                boolean xa)
                         throws Exception
Description copied from interface: JmsVendorConfiguration
Create a connection factory for the Jms profider being tested

Specified by:
getConnection in interface JmsVendorConfiguration
Parameters:
topic - whether to use a topic or queue connection factory, for 1.1 implementations this proerty can be ignored
xa - whether to create an XA connection factory
Returns:
a new JMS connection
Throws:
Exception

getInboundEndpoint

public String getInboundEndpoint()
Description copied from interface: JmsVendorConfiguration
Returns the JmsVendorConfiguration.getInboundDestinationName() in the form of an endpoint URI i.e. jms://in

Specified by:
getInboundEndpoint in interface JmsVendorConfiguration
Returns:
the Inbound JMS endpoint

getOutboundEndpoint

public String getOutboundEndpoint()
Description copied from interface: JmsVendorConfiguration
Returns the JmsVendorConfiguration.getOutboundDestinationName() in the form of an endpoint URI i.e. jms://out

Specified by:
getOutboundEndpoint in interface JmsVendorConfiguration
Returns:
the Outbound JMS endpoint

getMiddleEndpoint

public String getMiddleEndpoint()
Description copied from interface: JmsVendorConfiguration
Returns the JmsVendorConfiguration.getMiddleDestinationName() in the form of an endpoint URI i.e. jms://middle

Specified by:
getMiddleEndpoint in interface JmsVendorConfiguration
Returns:
the middle JMS endpoint

getTopicBroadcastEndpoint

public String getTopicBroadcastEndpoint()
Description copied from interface: JmsVendorConfiguration
Returns the JmsVendorConfiguration.getBroadcastDestinationName() in the form of an endpoint URI i.e. jms://topic:broadcast

Specified by:
getTopicBroadcastEndpoint in interface JmsVendorConfiguration
Returns:
the Broadcast JMS topic endpoint

getDeadLetterEndpoint

public String getDeadLetterEndpoint()
Description copied from interface: JmsVendorConfiguration
Returns the JmsVendorConfiguration.getDeadLetterDestinationName() in the form of an endpoint URI i.e. jms://dlq

Specified by:
getDeadLetterEndpoint in interface JmsVendorConfiguration
Returns:
the dead letter JMS endpoint

getInboundDestinationName

public String getInboundDestinationName()
Description copied from interface: JmsVendorConfiguration
The test inbound queue name. For consistency this should always be 'in'. Note that you need to make sure that this queue is available in the the JMS provider being tested.

Specified by:
getInboundDestinationName in interface JmsVendorConfiguration
Returns:
The test inbound destination name

getOutboundDestinationName

public String getOutboundDestinationName()
Description copied from interface: JmsVendorConfiguration
The test outbound queue name. For consistency this should always be 'out'. Note that you need to make sure that this queue is available in the the JMS provider being tested.

Specified by:
getOutboundDestinationName in interface JmsVendorConfiguration
Returns:
The test outbound destination name

getMiddleDestinationName

public String getMiddleDestinationName()
Description copied from interface: JmsVendorConfiguration
The test middle queue name. For consistency this should always be 'middle'. This value is used to create multiple middle queues, namely, 'middle', 'middle2', 'middle3'. You need to make sure that these queues are available in the the JMS provider being tested.

Specified by:
getMiddleDestinationName in interface JmsVendorConfiguration
Returns:
The test middle destination name

getBroadcastDestinationName

public String getBroadcastDestinationName()
Description copied from interface: JmsVendorConfiguration
The test broadcast topic name. For consistency this should always be 'broadcast'. Note that you need to make sure that this topic is available in the the JMS provider being tested.

Specified by:
getBroadcastDestinationName in interface JmsVendorConfiguration
Returns:
The test broadcast topic name

getDeadLetterDestinationName

public String getDeadLetterDestinationName()
Description copied from interface: JmsVendorConfiguration
The test dead letter queue name. For consistency this should always be 'dlq'. Note that you need to make sure that this queue is available in the the JMS provider being tested.

Specified by:
getDeadLetterDestinationName in interface JmsVendorConfiguration
Returns:
The test dead letterdestination name

getSmallTimeout

public long getSmallTimeout()
Timeout used when checking that a message is NOT present

Specified by:
getSmallTimeout in interface JmsVendorConfiguration
Returns:
timeout in milliseconds used when checking that a message is NOT present

getTimeout

public long getTimeout()
The timeout used when waiting for a message to arrive

Specified by:
getTimeout in interface JmsVendorConfiguration
Returns:
The timeout used when waiting for a message to arrive

getProtocol

public String getProtocol()
Description copied from interface: JmsVendorConfiguration
The protocol used for creating endpoints. This is usually 'jms' but for specific messaging transports such as WebsphereMQ the protocol will be the protocol of the transport i.e. 'wmq'.

Specified by:
getProtocol in interface JmsVendorConfiguration
Returns:
returns the transport protocol

getName

public String getName()
Specified by:
getName in interface NamedObject

getProperties

public Map getProperties()
Description copied from interface: ParameterizedConfiguration
Any properties returned by this method will be made available for substitution in the XML configuration file(s) for this test case.

Specified by:
getProperties in interface ParameterizedConfiguration

getTestConnectionFactory

public ConnectionFactory getTestConnectionFactory()
Specified by:
getTestConnectionFactory in interface JmsVendorConfiguration
Returns:
a ConnectionFactory implementation used for unit testing of the provider, usually consisting of some mocked-up methods.

isEnabled

public boolean isEnabled()
Description copied from interface: ParameterizedConfiguration
A configuration which is not enabled will be skipped over when running tests.

Specified by:
isEnabled in interface ParameterizedConfiguration


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.