Package org.apache.activemq.junit
Class ActiveMQDynamicTopicPublisherResource
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- org.apache.activemq.junit.AbstractActiveMQClientResource
-
- org.apache.activemq.junit.AbstractActiveMQProducerResource
-
- org.apache.activemq.junit.ActiveMQDynamicTopicPublisherResource
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class ActiveMQDynamicTopicPublisherResource extends AbstractActiveMQProducerResource
-
-
Constructor Summary
Constructors Constructor Description ActiveMQDynamicTopicPublisherResource(String defaultDestinationName, URI brokerURI)
ActiveMQDynamicTopicPublisherResource(String defaultDestinationName, URI brokerURI, String userName, String password)
ActiveMQDynamicTopicPublisherResource(String defaultDestinationName, ActiveMQConnectionFactory connectionFactory)
ActiveMQDynamicTopicPublisherResource(String destinationName, EmbeddedActiveMQBroker embeddedActiveMQBroker)
ActiveMQDynamicTopicPublisherResource(URI brokerURI)
ActiveMQDynamicTopicPublisherResource(URI brokerURI, String userName, String password)
ActiveMQDynamicTopicPublisherResource(ActiveMQConnectionFactory connectionFactory)
ActiveMQDynamicTopicPublisherResource(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
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(ActiveMQConnectionFactory connectionFactory)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(URI brokerURI)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(EmbeddedActiveMQBroker embeddedActiveMQBroker)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(URI brokerURI, String userName, String password)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(String defaultDestinationName, ActiveMQConnectionFactory connectionFactory)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(String defaultDestinationName, URI brokerURI)
-
ActiveMQDynamicTopicPublisherResource
public ActiveMQDynamicTopicPublisherResource(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
-
-