public class JMSQueueMessageProducer extends Object
| Constructor and Description |
|---|
JMSQueueMessageProducer(org.wso2.carbon.automation.extensions.servers.jmsserver.controller.config.JMSBrokerConfiguration jmsBrokerConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String queueName)
Method to establish the connection with the given Queue, with messages not being persisted.
|
void |
connect(String queueName,
boolean persistMessage)
Method to establish the connection with the given Queue, with message persistance as specified.
|
void |
disconnect()
Method to disconnect the connection with the given Queue.
|
void |
sendBytesMessage(byte[] payload)
Method to send a BytesMessage.
|
void |
sendMapMessage()
Method to send a MapMessage.
|
void |
sendMessage(javax.jms.Message message)
Method to send the message to the destination Queue.
|
void |
sendObjectMessage(Serializable payload)
Method to send an ObjectMessage.
|
void |
sendStreamMessage(byte[] payload)
Method to send a StreamMessage.
|
void |
sendTextMessage(String payload)
Method to send a TextMessage.
|
public JMSQueueMessageProducer(org.wso2.carbon.automation.extensions.servers.jmsserver.controller.config.JMSBrokerConfiguration jmsBrokerConfiguration)
throws NamingException
NamingExceptionpublic void connect(String queueName) throws javax.jms.JMSException
queueName - name of the Queuejavax.jms.JMSException - if an error occurs creating the connection, session or producerpublic void connect(String queueName, boolean persistMessage) throws javax.jms.JMSException
persistMessage - whether or not messages need to be persistedqueueName - name of the queuejavax.jms.JMSException - if connection to the queue failspublic void disconnect()
public void sendMessage(javax.jms.Message message)
throws javax.jms.JMSException
message - message to be sentjavax.jms.JMSExceptionpublic void sendTextMessage(String payload) throws javax.jms.JMSException
payload - content of the TextMessage to be sentjavax.jms.JMSException - if an error occurs sending the BytesMessagepublic void sendBytesMessage(byte[] payload)
throws javax.jms.JMSException
payload - content of the BytesMessage to be sentjavax.jms.JMSException - if an error occurs sending the BytesMessagepublic void sendStreamMessage(byte[] payload)
throws javax.jms.JMSException
payload - content of the StreamMessage to be sentjavax.jms.JMSException - if an error occurs sending the BytesMessagepublic void sendMapMessage()
throws javax.jms.JMSException
javax.jms.JMSException - if an error occurs sending the MapMessagepublic void sendObjectMessage(Serializable payload) throws javax.jms.JMSException
payload - content of the ObjectMessage to be sentjavax.jms.JMSException - if an error occurs sending the ObjectMessageCopyright © 2018 WSO2. All rights reserved.