Package org.apache.activemq.junit
Class ActiveMQDynamicQueueSenderResource
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.apache.activemq.junit.AbstractActiveMQClientResource
-
- org.apache.activemq.junit.AbstractActiveMQProducerResource
-
- org.apache.activemq.junit.ActiveMQDynamicQueueSenderResource
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class ActiveMQDynamicQueueSenderResource extends AbstractActiveMQProducerResource
-
-
Constructor Summary
Constructors Constructor Description ActiveMQDynamicQueueSenderResource(String defaultDestinationName, URI brokerURI)
ActiveMQDynamicQueueSenderResource(String defaultDestinationName, URI brokerURI, String userName, String password)
ActiveMQDynamicQueueSenderResource(String defaultDestinationName, ActiveMQConnectionFactory connectionFactory)
ActiveMQDynamicQueueSenderResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)
ActiveMQDynamicQueueSenderResource(URI brokerURI)
ActiveMQDynamicQueueSenderResource(URI brokerURI, String userName, String password)
ActiveMQDynamicQueueSenderResource(ActiveMQConnectionFactory connectionFactory)
ActiveMQDynamicQueueSenderResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createClient()
byte
getDestinationType()
BytesMessage
sendMessage(String destinationName, byte[] body)
ObjectMessage
sendMessage(String destinationName, Serializable body)
TextMessage
sendMessage(String destinationName, String body)
MapMessage
sendMessage(String destinationName, Map<String,Object> body)
void
sendMessage(String destinationName, Message message)
void
sendMessage(Message message)
BytesMessage
sendMessageWithProperties(String destinationName, byte[] body, Map<String,Object> properties)
ObjectMessage
sendMessageWithProperties(String destinationName, Serializable body, Map<String,Object> properties)
TextMessage
sendMessageWithProperties(String destinationName, String body, Map<String,Object> properties)
MapMessage
sendMessageWithProperties(String destinationName, Map<String,Object> body, Map<String,Object> properties)
-
Methods inherited from class org.apache.activemq.junit.AbstractActiveMQProducerResource
getDestinationName, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageWithProperties, sendMessageWithProperties, sendMessageWithProperties, sendMessageWithProperties
-
Methods inherited from class org.apache.activemq.junit.AbstractActiveMQClientResource
after, before, createBytesMessage, createDestination, createMapMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, createObjectMessage, createStreamMessage, createTextMessage, getBrokerURL, getClientId, setMessageProperties, start, stop
-
-
-
-
Constructor Detail
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(ActiveMQConnectionFactory connectionFactory)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(URI brokerURI)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(URI brokerURI, String userName, String password)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(String defaultDestinationName, ActiveMQConnectionFactory connectionFactory)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(String defaultDestinationName, URI brokerURI)
-
ActiveMQDynamicQueueSenderResource
public ActiveMQDynamicQueueSenderResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
-
Method Detail
-
createClient
protected void createClient() throws JMSException
- Specified by:
createClient
in classAbstractActiveMQClientResource
- Throws:
JMSException
-
getDestinationType
public byte getDestinationType()
- Specified by:
getDestinationType
in classAbstractActiveMQClientResource
-
sendMessage
public void sendMessage(Message message) throws JMSException
- Overrides:
sendMessage
in classAbstractActiveMQProducerResource
- Throws:
JMSException
-
sendMessage
public void sendMessage(String destinationName, Message message) throws JMSException
- Throws:
JMSException
-
sendMessage
public BytesMessage sendMessage(String destinationName, byte[] body) throws JMSException
- Throws:
JMSException
-
sendMessage
public TextMessage sendMessage(String destinationName, String body) throws JMSException
- Throws:
JMSException
-
sendMessage
public MapMessage sendMessage(String destinationName, Map<String,Object> body) throws JMSException
- Throws:
JMSException
-
sendMessage
public ObjectMessage sendMessage(String destinationName, Serializable body) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public BytesMessage sendMessageWithProperties(String destinationName, byte[] body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public TextMessage sendMessageWithProperties(String destinationName, String body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public MapMessage sendMessageWithProperties(String destinationName, Map<String,Object> body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
sendMessageWithProperties
public ObjectMessage sendMessageWithProperties(String destinationName, Serializable body, Map<String,Object> properties) throws JMSException
- Throws:
JMSException
-
-