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) ActiveMQ Artemis ClientProducer into a test.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.artemis.junit.AbstractActiveMQClientDelegate
AbstractActiveMQClientDelegate.ActiveMQClientResourceException
-
-
Constructor Summary
Constructors Constructor Description ActiveMQDynamicProducerDelegate(String url)ActiveMQDynamicProducerDelegate(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateClient()voidsendMessage(ClientMessage message)Send a ClientMessage to the server.ClientMessagesendMessage(SimpleString targetAddress, byte[] body)Create a new ClientMessage with the specified body and send to the specified address on the serverClientMessagesendMessage(SimpleString targetAddress, byte[] body, Map<String,Object> properties)Create a new ClientMessage with the specified body and and properties and send to the serverClientMessagesendMessage(SimpleString targetAddress, String body)Create a new ClientMessage with the specified body and send to the serverClientMessagesendMessage(SimpleString targetAddress, String body, Map<String,Object> properties)Create a new ClientMessage with the specified body and and properties and send to the serverClientMessagesendMessage(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 server-
Methods inherited from class org.apache.activemq.artemis.junit.ActiveMQProducerDelegate
createMessage, createMessage, createMessage, createMessage, createMessage, createMessage, isUseDurableMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, setUseDurableMessage, stopClient
-
Methods inherited from class org.apache.activemq.artemis.junit.AbstractActiveMQClientDelegate
addMessageProperties, isAutoCreateQueue, setAutoCreateQueue
-
-
-
-
Constructor Detail
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(String url, String username, String password)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(String url)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, String username, String password)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(String url, SimpleString address, String username, String password)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(String url, SimpleString address)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, SimpleString address, String username, String password)
-
ActiveMQDynamicProducerDelegate
public ActiveMQDynamicProducerDelegate(ServerLocator serverLocator, SimpleString address)
-
-
Method Detail
-
createClient
protected void createClient()
- Overrides:
createClientin classActiveMQProducerDelegate
-
sendMessage
public void sendMessage(ClientMessage message)
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
public void sendMessage(SimpleString targetAddress, ClientMessage message)
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
public ClientMessage sendMessage(SimpleString targetAddress, byte[] body)
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
public ClientMessage sendMessage(SimpleString targetAddress, String body)
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
public ClientMessage sendMessage(SimpleString targetAddress, Map<String,Object> properties)
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
-
-