| Constructor and Description |
|---|
JmsMethods(io.toro.martini.jms.JmsPublisher.Factory jmsPublisherFactory) |
| Modifier and Type | Method and Description |
|---|---|
static void |
publishBytes(String destinationName,
byte[] bytes)
Send an array of bytes to the JMS broker.
|
static void |
publishBytes(String destinationName,
byte[] bytes,
Closure replyClosure)
Send an array of bytes to the JMS broker.
|
static void |
publishBytes(String destinationName,
byte[] bytes,
Map<String,Object> properties)
Send an array of bytes to the JMS broker.
|
static void |
publishObject(String destinationName,
Serializable obj)
Send a serializable object to the JMS broker.
|
static void |
publishObject(String destinationName,
Serializable obj,
Closure replyClosure)
Send a serializable object to the JMS broker.
|
static void |
publishObject(String destinationName,
Serializable obj,
Map<String,Object> properties)
Send a serializable object to the JMS broker.
|
static void |
publishString(String destinationName,
String string)
Send a string to the JMS broker.
|
static void |
publishString(String destinationName,
String string,
Closure replyClosure)
Send a string to the JMS broker.
|
static void |
publishString(String destinationName,
String string,
Map<String,Object> properties)
Send a string to the JMS broker.
|
static void |
publishTo(byte[] bytes,
String destinationName)
Send a string to the JMS broker.
|
static void |
publishTo(byte[] bytes,
String destinationName,
Closure replyClosure)
Send an array of bytes to the JMS broker.
|
static void |
publishTo(byte[] bytes,
String destinationName,
Map properties)
Send an array of bytes to the JMS broker.
|
static void |
publishTo(Serializable obj,
String destinationName)
Send a serializable object to the JMS broker.
|
static void |
publishTo(Serializable obj,
String destinationName,
Closure replyClosure)
Send a serializable object to the JMS broker.
|
static void |
publishTo(Serializable obj,
String destinationName,
Map<String,Object> properties)
Send a serializable object to the JMS broker.
|
static void |
publishTo(String string,
String destinationName)
Send a string to the JMS broker.
|
static void |
publishTo(String string,
String destinationName,
Closure replyClosure)
Send a string to the JMS broker.
|
static void |
publishTo(String string,
String destinationName,
Map properties)
Send a string to the JMS broker.
|
static void |
replyTo(byte[] bytes,
Message requestMessage)
Send an array of bytes to the JMS broker.
|
static void |
replyTo(byte[] bytes,
Message requestMessage,
Map<String,Object> properties)
Send an array of bytes to the JMS broker.
|
static void |
replyTo(Serializable obj,
Message requestMessage)
Send a serializable object to the JMS broker.
|
static void |
replyTo(Serializable obj,
Message requestMessage,
Map<String,Object> properties)
Send a serializable object to the JMS broker.
|
static void |
replyTo(String string,
Message requestMessage)
Send a string to the JMS broker.
|
static void |
replyTo(String string,
Message requestMessage,
Map<String,Object> properties)
Send a string to the JMS broker.
|
static void |
replyWith(Message requestMessage,
byte[] bytes)
Send an array of bytes to the JMS broker.
|
static void |
replyWith(Message requestMessage,
byte[] bytes,
Map<String,Object> properties)
Send an array of bytes to the JMS broker.
|
static void |
replyWith(Message requestMessage,
Serializable obj)
Send a serializable object to the JMS broker.
|
static void |
replyWith(Message requestMessage,
Serializable obj,
Map<String,Object> properties)
Send a serializable object to the JMS broker.
|
static void |
replyWith(Message requestMessage,
String string)
Send a string to the JMS broker.
|
static void |
replyWith(Message requestMessage,
String string,
Map<String,Object> properties)
Send a string to the JMS broker.
|
static void |
sendAlert(AlertJMSMessage alertJMSMessage)
Send a message to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
static void |
sendAlert(String message)
Send a message with the provided properties
to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
static void |
sendAlert(String message,
int severity)
Send a message with the provided properties
to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
static void |
sendAlert(String message,
String source)
Send a message with the provided properties
to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
static void |
sendAlert(String message,
String source,
int severity)
Send a message with the provided properties
to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
static void |
sendAlert(String message,
String source,
int severity,
Map<Serializable,Serializable> properties)
Send a message with the provided properties
to the alert topic topic://io.toro.martini.alert.AlertQueue.
|
@Autowired JmsMethods(io.toro.martini.jms.JmsPublisher.Factory jmsPublisherFactory)
public static void publishTo(Serializable obj, String destinationName) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world!'
serializable.publishTo('queue://com.torocloud.example.HelloQueue')
obj - the object to senddestinationName - the name of the queue/topic to send the object toJMSExceptionpublic static void publishTo(Serializable obj, String destinationName, Closure replyClosure) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world!'
serializable.publishTo('queue://com.torocloud.example.HelloQueue') {
message -> println "Received a reply: ${message}"
}
obj - the object to senddestinationName - the name of the queue/topic to send the object toJMSExceptionpublic static void publishTo(Serializable obj, String destinationName, Map<String,Object> properties) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world!'
serializable.publishTo('queue://com.torocloud.example.HelloQueue', [ "property": "value" ])
obj - the object to senddestinationName - the name of the queue/topic to send the object toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void publishTo(String string, String destinationName) throws JMSException
Send a string to the JMS broker.
Example usage:
'Hello, world!'.publishTo( 'queue://com.torocloud.example.HelloQueue' )
string - the string to senddestinationName - the name of the queue/topic to send the object toJMSExceptionpublic static void publishTo(String string, String destinationName, Map properties) throws JMSException
Send a string to the JMS broker.
Example usage:
'Hello, world'.publishTo('queue://com.torocloud.example.HelloQueue', [ "property": "value" ])
string - the string to senddestinationName - the name of the queue/topic to send the object toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void publishTo(String string, String destinationName, Closure replyClosure) throws JMSException
Send a string to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishString( 'Hello, world!' ){
println "Received a reply: ${message}"
}
destinationName - the name of the queue/topic to send the object tostring - the string to sendJMSExceptionpublic static void publishTo(byte[] bytes,
String destinationName)
throws JMSException
Send a string to the JMS broker.
Example usage:
def bytes = new byte[]; ... bytes.publishTo( 'queue://com.torocloud.example.BytesQueue' )
bytes - the array of bytes to senddestinationName - the name of the queue/topic to send the object toJMSExceptionpublic static void publishTo(byte[] bytes,
String destinationName,
Map properties)
throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... bytes.publishTo( 'queue://com.torocloud.example.BytesQueue' )
bytes - the array of bytes to senddestinationName - the name of the queue/topic to send the object toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void publishTo(byte[] bytes,
String destinationName,
Closure replyClosure)
throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[];
...
bytes.publishTo( 'queue://com.torocloud.example.BytesQueue') {
message -> println "Received a reply: ${message}"
}
destinationName - the name of the queue/topic to send the object tobytes - the array of bytes to sendJMSExceptionpublic static void publishObject(String destinationName, Serializable obj, Map<String,Object> properties) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world!' 'queue://com.torocloud.example.HelloQueue'.publishObject(serializable, [ "property": "value" ])
destinationName - the name of the queue/topic to send the object toobj - the object to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void publishObject(String destinationName, Serializable obj) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishObject('Hello, world')
destinationName - the name of the queue/topic to send the object toobj - the object to sendJMSExceptionpublic static void publishObject(String destinationName, Serializable obj, Closure replyClosure) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishObject('Hello, world') {
message -> println "Received a reply: ${message}"
}
destinationName - the name of the queue/topic to send the object toobj - the object to sendJMSExceptionpublic static void publishString(String destinationName, String string) throws JMSException
Send a string to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishString('Hello, world')
destinationName - the name of the queue/topic to send the object tostring - the string to sendJMSExceptionpublic static void publishString(String destinationName, String string, Closure replyClosure) throws JMSException
Send a string to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishString('Hello, world') {
message -> println "Received a reply: ${message}"
}
destinationName - the name of the queue/topic to send the object tostring - the string to sendJMSExceptionpublic static void publishString(String destinationName, String string, Map<String,Object> properties) throws JMSException
Send a string to the JMS broker.
Example usage:
'queue://com.torocloud.example.HelloQueue'.publishString('Hello, world', [ 'property': 'value' ])
destinationName - the name of the queue/topic to send the object tostring - the string to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void publishBytes(String destinationName, byte[] bytes) throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... 'queue://com.torocloud.example.BytesQueue'.publishBytes( bytes )
destinationName - the name of the queue/topic to send the object tobytes - the array of bytes to sendJMSExceptionpublic static void publishBytes(String destinationName, byte[] bytes, Closure replyClosure) throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[];
...
'queue://com.torocloud.example.BytesQueue'.publishBytes( bytes ) {
message -> println "Received a reply: ${message}"
}
destinationName - the name of the queue/topic to send the object tobytes - the array of bytes to sendJMSExceptionpublic static void publishBytes(String destinationName, byte[] bytes, Map<String,Object> properties) throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... 'queue://com.torocloud.example.BytesQueue'.publishBytes( bytes, [ 'property': 'value' ] )
destinationName - the name of the queue/topic to send the object tobytes - the array of bytes to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyTo(Serializable obj, Message requestMessage) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world' serializable.replyTo( message )
obj - the object to sendrequestMessage - the message to reply toJMSExceptionpublic static void replyTo(Serializable obj, Message requestMessage, Map<String,Object> properties) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
'Hello, world'.replyTo( message, properties )
obj - the object to sendrequestMessage - the message to reply toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyTo(String string, Message requestMessage) throws JMSException
Send a string to the JMS broker.
Example usage:
'Hello, world'.publishTo( message )
string - the string to sendrequestMessage - the message to reply toJMSExceptionpublic static void replyTo(String string, Message requestMessage, Map<String,Object> properties) throws JMSException
Send a string to the JMS broker.
Example usage:
'Hello, world'.replyTo( message, [ 'property': 'value' ] )
string - the string to sendrequestMessage - the message to reply toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyTo(byte[] bytes,
Message requestMessage)
throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... bytes.replyTo( message )
bytes - the array of bytes to sendrequestMessage - the message to reply toJMSExceptionpublic static void replyTo(byte[] bytes,
Message requestMessage,
Map<String,Object> properties)
throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... bytes.replyTo( message, [ 'property': 'value' ] )
bytes - the array of bytes to sendrequestMessage - the message to reply toproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyWith(Message requestMessage, Serializable obj) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world' message.replyWith( serializable )
requestMessage - the message to reply toobj - the object to sendJMSExceptionpublic static void replyWith(Message requestMessage, Serializable obj, Map<String,Object> properties) throws JMSException
Send a serializable object to the JMS broker.
Example usage:
Serializable serializable = 'Hello, world' message.replyWith( serializable, [ 'property' : 'value' ] )
requestMessage - the message to reply toobj - the object to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyWith(Message requestMessage, String string) throws JMSException
Send a string to the JMS broker.
Example usage:
message.replyWith( 'Hello, world' )
requestMessage - the message to reply tostring - the string to sendJMSExceptionpublic static void replyWith(Message requestMessage, String string, Map<String,Object> properties) throws JMSException
Send a string to the JMS broker.
Example usage:
message.replyWith( 'Hello, world', [ 'property': 'value' ] )
requestMessage - the message to reply tostring - the string to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void replyWith(Message requestMessage, byte[] bytes) throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... message.replyWith( bytes )
requestMessage - the message to reply tobytes - the array of bytes to sendJMSExceptionpublic static void replyWith(Message requestMessage, byte[] bytes, Map<String,Object> properties) throws JMSException
Send an array of bytes to the JMS broker.
Example usage:
def bytes = new byte[]; ... message.replyWith( bytes, [ 'property': 'value' ] )
requestMessage - the message to reply tobytes - the array of bytes to sendproperties - Map of properties to set on the message.
Property values must be a String or primitive.
The producer options can also be configured with the following keys:
persistentDelivery, timeToLive, priority, and ackMode.JMSExceptionpublic static void sendAlert(String message) throws JMSException
Send a message with the provided properties to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
'Hello, world'.sendAlert()
message - alert messageJMSExceptionpublic static void sendAlert(String message, int severity) throws JMSException
Send a message with the provided properties to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
'Hello, world'.sendAlert( 1 )
message - alert messageseverity - severity of the alertJMSExceptionpublic static void sendAlert(String message, String source) throws JMSException
Send a message with the provided properties to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
'Hello, world'.sendAlert( 'source' )
message - alert messagesource - the source of the alertJMSExceptionpublic static void sendAlert(String message, String source, int severity) throws JMSException
Send a message with the provided properties to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
'Hello, world'.sendAlert( 'source', 0 )
message - alert messagesource - the source of the alertseverity - severity of the alertJMSExceptionpublic static void sendAlert(String message, String source, int severity, Map<Serializable,Serializable> properties) throws JMSException
Send a message with the provided properties to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
'Hello, world'.sendAlert( 'source', 0, [ 'property': 'value' ] )
message - alert messagesource - the source of the alertseverity - severity of the alertproperties - properties of the alertJMSExceptionpublic static void sendAlert(AlertJMSMessage alertJMSMessage) throws JMSException
Send a message to the alert topic topic://io.toro.martini.alert.AlertQueue.
Example usage:
def message = new AlertJMSMessage( 'message', 'source', 0, [ 'property': 'value' ] ) message.sendAlert()
alertJMSMessage - the message to be sent to JMS brokerJMSExceptionCopyright © 2022. All rights reserved.