Class ActiveMQDynamicProducerDelegate
java.lang.Object
org.apache.activemq.artemis.junit.AbstractActiveMQClientDelegate
org.apache.activemq.artemis.junit.ActiveMQProducerDelegate
org.apache.activemq.artemis.junit.ActiveMQDynamicProducerDelegate
- All Implemented Interfaces:
ActiveMQDynamicProducerOperations, ActiveMQProducerOperations
public class ActiveMQDynamicProducerDelegate
extends ActiveMQProducerDelegate
implements ActiveMQDynamicProducerOperations
Base class to embed an dynamic (i.e. unbound) Apache Artemis ClientProducer into a test.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractActiveMQClientDelegate
AbstractActiveMQClientDelegate.ActiveMQClientResourceException -
Constructor Summary
ConstructorsConstructorDescriptionActiveMQDynamicProducerDelegate(String url, String username, String password) ActiveMQDynamicProducerDelegate(String url, SimpleString address) ActiveMQDynamicProducerDelegate(String url, SimpleString address, String username, String password) ActiveMQDynamicProducerDelegate(ServerLocator serverLocator) ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, String username, String password) ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, SimpleString address) ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, SimpleString address, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidsendMessage(ClientMessage message) Send a ClientMessage to the server.sendMessage(SimpleString targetAddress, byte[] body) Create a new ClientMessage with the specified body and send to the specified address on the serversendMessage(SimpleString targetAddress, byte[] body, Map<String, Object> properties) Create a new ClientMessage with the specified body and and properties and send to the serversendMessage(SimpleString targetAddress, String body) Create a new ClientMessage with the specified body and send to the serversendMessage(SimpleString targetAddress, String body, Map<String, Object> properties) Create a new ClientMessage with the specified body and and properties and send to the serversendMessage(SimpleString targetAddress, Map<String, Object> properties) Create a new ClientMessage with the specified properties and send to the servervoidsendMessage(SimpleString targetAddress, ClientMessage message) Send a ClientMessage to the specified address on the serverMethods inherited from class ActiveMQProducerDelegate
createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, isUseDurableMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setUseDurableMessage, stopClientMethods inherited from class AbstractActiveMQClientDelegate
addMessageProperties, isAutoCreateQueue, setAutoCreateQueue
-
Constructor Details
-
ActiveMQDynamicProducerDelegate
-
ActiveMQDynamicProducerDelegate
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, String username, String password) -
ActiveMQDynamicProducerDelegate
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(String url, SimpleString address, String username, String password) -
ActiveMQDynamicProducerDelegate
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, SimpleString address, String username, String password) -
ActiveMQDynamicProducerDelegate
-
-
Method Details
-
createClient
protected void createClient()- Overrides:
createClientin classActiveMQProducerDelegate
-
sendMessage
Description copied from interface:ActiveMQProducerOperationsSend a ClientMessage to the server.- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Specified by:
sendMessagein interfaceActiveMQProducerOperations- Overrides:
sendMessagein classActiveMQProducerDelegate- Parameters:
message- the message to send
-
sendMessage
Description copied from interface:ActiveMQDynamicProducerOperationsSend a ClientMessage to the specified address on the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressmessage- the message to send
-
sendMessage
Description copied from interface:ActiveMQDynamicProducerOperationsCreate a new ClientMessage with the specified body and send to the specified address on the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressbody- the body for the new message- Returns:
- the message that was sent
-
sendMessage
Description copied from interface:ActiveMQDynamicProducerOperationsCreate a new ClientMessage with the specified body and send to the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressbody- the body for the new message- Returns:
- the message that was sent
-
sendMessage
Description copied from interface:ActiveMQDynamicProducerOperationsCreate a new ClientMessage with the specified properties and send to the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressproperties- the properties for the new message- Returns:
- the message that was sent
-
sendMessage
public ClientMessage sendMessage(SimpleString targetAddress, byte[] body, Map<String, Object> properties) Description copied from interface:ActiveMQDynamicProducerOperationsCreate a new ClientMessage with the specified body and and properties and send to the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressproperties- the properties for the new message- Returns:
- the message that was sent
-
sendMessage
public ClientMessage sendMessage(SimpleString targetAddress, String body, Map<String, Object> properties) Description copied from interface:ActiveMQDynamicProducerOperationsCreate a new ClientMessage with the specified body and and properties and send to the server- Specified by:
sendMessagein interfaceActiveMQDynamicProducerOperations- Parameters:
targetAddress- the target addressproperties- the properties for the new message- Returns:
- the message that was sent
-