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, ActiveMQConnectionFactory connectionFactory)AbstractActiveMQProducerResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)AbstractActiveMQProducerResource(URI brokerURI)AbstractActiveMQProducerResource(URI brokerURI, String userName, String password)AbstractActiveMQProducerResource(ActiveMQConnectionFactory connectionFactory)AbstractActiveMQProducerResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDestinationName()BytesMessagesendMessage(byte[] body)ObjectMessagesendMessage(Serializable body)TextMessagesendMessage(String body)MapMessagesendMessage(Map<String,Object> body)voidsendMessage(Message message)BytesMessagesendMessageWithProperties(byte[] body, Map<String,Object> properties)ObjectMessagesendMessageWithProperties(Serializable body, Map<String,Object> properties)TextMessagesendMessageWithProperties(String body, Map<String,Object> properties)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(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, 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(Message message) throws JMSException
- Throws:
JMSException
-
sendMessage
public BytesMessage sendMessage(byte[] body) throws JMSException
- Throws:
JMSException
-
sendMessage
public TextMessage sendMessage(String body) throws JMSException
- Throws:
JMSException
-
sendMessage
public MapMessage sendMessage(Map<String,Object> body) throws JMSException
- Throws:
JMSException
-
sendMessage
public ObjectMessage sendMessage(Serializable body) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public BytesMessage sendMessageWithProperties(byte[] body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public TextMessage sendMessageWithProperties(String body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public MapMessage sendMessageWithProperties(Map<String,Object> body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public ObjectMessage sendMessageWithProperties(Serializable body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
-