public class ActiveMQProducerResource extends AbstractActiveMQClientResource
public class SimpleTest {AbstractActiveMQClientResource.ActiveMQClientResourceException| Modifier | Constructor and Description |
|---|---|
protected |
ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator) |
|
ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
org.apache.activemq.artemis.api.core.SimpleString address) |
|
ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
String address) |
protected |
ActiveMQProducerResource(String url) |
|
ActiveMQProducerResource(String url,
org.apache.activemq.artemis.api.core.SimpleString address) |
|
ActiveMQProducerResource(String url,
String address) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createClient() |
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage()
Create a ClientMessage
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage(byte[] body)
Create a ClientMessage with the specified body
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage(byte[] body,
Map<String,Object> properties)
Create a ClientMessage with the specified body and message properties
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage(Map<String,Object> properties)
Create a ClientMessage with the specified message properties
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage(String body)
Create a ClientMessage with the specified body
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
createMessage(String body,
Map<String,Object> properties)
Create a ClientMessage with the specified body and message properties
|
boolean |
isUseDurableMessage() |
org.apache.activemq.artemis.api.core.client.ClientMessage |
sendMessage(byte[] body)
Create a new ClientMessage with the specified body and send to the server
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
sendMessage(byte[] body,
Map<String,Object> properties)
Create a new ClientMessage with the specified body and and properties and send to the server
|
void |
sendMessage(org.apache.activemq.artemis.api.core.client.ClientMessage message)
Send a ClientMessage to the server
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
sendMessage(Map<String,Object> properties)
Create a new ClientMessage with the specified properties and send to the server
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
sendMessage(String body)
Create a new ClientMessage with the specified body and send to the server
|
org.apache.activemq.artemis.api.core.client.ClientMessage |
sendMessage(String body,
Map<String,Object> properties)
Create a new ClientMessage with the specified body and and properties and send to the server
|
void |
setUseDurableMessage(boolean useDurableMessage)
Disables/Enables creating durable messages.
|
protected void |
stopClient() |
addMessageProperties, after, before, isAutoCreateQueue, setAutoCreateQueueprotected ActiveMQProducerResource(String url)
protected ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator)
public ActiveMQProducerResource(String url, org.apache.activemq.artemis.api.core.SimpleString address)
public ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
String address)
public ActiveMQProducerResource(org.apache.activemq.artemis.api.core.client.ServerLocator serverLocator,
org.apache.activemq.artemis.api.core.SimpleString address)
public boolean isUseDurableMessage()
public void setUseDurableMessage(boolean useDurableMessage)
useDurableMessage - if true, durable messages will be createdprotected void createClient()
createClient in class AbstractActiveMQClientResourceprotected void stopClient()
stopClient in class AbstractActiveMQClientResourcepublic org.apache.activemq.artemis.api.core.client.ClientMessage createMessage()
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
public org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(byte[] body)
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
body - the body for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(String body)
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
body - the body for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(Map<String,Object> properties)
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
properties - message properties for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(byte[] body,
Map<String,Object> properties)
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
body - the body for the new messageproperties - message properties for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage createMessage(String body, Map<String,Object> properties)
If useDurableMessage is false, a non-durable message is created. Otherwise, a durable message is created
body - the body for the new messageproperties - message properties for the new messagepublic void sendMessage(org.apache.activemq.artemis.api.core.client.ClientMessage message)
message - the message to sendpublic org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(byte[] body)
body - the body for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(String body)
body - the body for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(Map<String,Object> properties)
properties - the properties for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(byte[] body,
Map<String,Object> properties)
properties - the properties for the new messagepublic org.apache.activemq.artemis.api.core.client.ClientMessage sendMessage(String body, Map<String,Object> properties)
properties - the properties for the new messageCopyright © 2023 The Apache Software Foundation. All Rights Reserved.