Package org.apache.activemq.junit
Class AbstractActiveMQProducerResource
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.apache.activemq.junit.AbstractActiveMQClientResource
-
- org.apache.activemq.junit.AbstractActiveMQProducerResource
-
- All Implemented Interfaces:
org.junit.rules.TestRule
- Direct Known Subclasses:
ActiveMQDynamicQueueSenderResource,ActiveMQDynamicTopicPublisherResource,ActiveMQQueueSenderResource,ActiveMQTopicPublisherResource
public abstract class AbstractActiveMQProducerResource extends AbstractActiveMQClientResource
-
-
Constructor Summary
Constructors Constructor Description AbstractActiveMQProducerResource(String destinationName, URI brokerURI)AbstractActiveMQProducerResource(String destinationName, URI brokerURI, String userName, String password)AbstractActiveMQProducerResource(String destinationName, org.apache.activemq.ActiveMQConnectionFactory connectionFactory)AbstractActiveMQProducerResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)AbstractActiveMQProducerResource(URI brokerURI)AbstractActiveMQProducerResource(URI brokerURI, String userName, String password)AbstractActiveMQProducerResource(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)AbstractActiveMQProducerResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDestinationName()javax.jms.BytesMessagesendMessage(byte[] body)javax.jms.ObjectMessagesendMessage(Serializable body)javax.jms.TextMessagesendMessage(String body)javax.jms.MapMessagesendMessage(Map<String,Object> body)voidsendMessage(javax.jms.Message message)javax.jms.BytesMessagesendMessageWithProperties(byte[] body, Map<String,Object> properties)javax.jms.ObjectMessagesendMessageWithProperties(Serializable body, Map<String,Object> properties)javax.jms.TextMessagesendMessageWithProperties(String body, Map<String,Object> properties)javax.jms.MapMessagesendMessageWithProperties(Map<String,Object> body, Map<String,Object> properties)-
Methods inherited from class org.apache.activemq.junit.AbstractActiveMQClientResource
after, before, createBytesMessage, createClient, createDestination, createMapMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createObjectMessage, createStreamMessage, createTextMessage, getBrokerURL, getClientId, getDestinationType, setMessageProperties, start, stop
-
-
-
-
Constructor Detail
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(URI brokerURI)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(URI brokerURI, String userName, String password)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(String destinationName, org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(String destinationName, URI brokerURI)
-
AbstractActiveMQProducerResource
public AbstractActiveMQProducerResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
-
Method Detail
-
getDestinationName
public String getDestinationName()
- Overrides:
getDestinationNamein classAbstractActiveMQClientResource
-
sendMessage
public void sendMessage(javax.jms.Message message) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
sendMessage
public javax.jms.BytesMessage sendMessage(byte[] body) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
sendMessage
public javax.jms.TextMessage sendMessage(String body) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessage
public javax.jms.MapMessage sendMessage(Map<String,Object> body) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessage
public javax.jms.ObjectMessage sendMessage(Serializable body) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessageWithProperties
public javax.jms.BytesMessage sendMessageWithProperties(byte[] body, Map<String,Object> properties) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
sendMessageWithProperties
public javax.jms.TextMessage sendMessageWithProperties(String body, Map<String,Object> properties) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessageWithProperties
public javax.jms.MapMessage sendMessageWithProperties(Map<String,Object> body, Map<String,Object> properties) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessageWithProperties
public javax.jms.ObjectMessage sendMessageWithProperties(Serializable body, Map<String,Object> properties) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-