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 String
getDestinationName()
BytesMessage
sendMessage(byte[] body)
ObjectMessage
sendMessage(Serializable body)
TextMessage
sendMessage(String body)
MapMessage
sendMessage(Map<String,Object> body)
void
sendMessage(Message message)
BytesMessage
sendMessageWithProperties(byte[] body, Map<String,Object> properties)
ObjectMessage
sendMessageWithProperties(Serializable body, Map<String,Object> properties)
TextMessage
sendMessageWithProperties(String body, Map<String,Object> properties)
MapMessage
sendMessageWithProperties(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:
getDestinationName
in 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
-
-