public final class MessageConnector extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MSGPRIORITY
the message priority to use when sending a message over the message queue
|
static long |
REQUEST_TIMEOUT
the default request timeout
|
static String |
SYSPROP_IBROKERURL
name of the system property that contains the interconnect broker URL
|
static String |
SYSPROP_UPDATE_TOPIC
name of the system property that contains the interconnect update topic name
|
| Modifier and Type | Method and Description |
|---|---|
static void |
decryptMessage(javax.jms.TextMessage txt) |
static boolean |
isMessageSecure(javax.jms.TextMessage txt) |
static javax.jms.TextMessage |
receive(String queueName,
String selector,
long timeout,
boolean secure)
Deprecated.
use receiveFromQueue instead
|
static List<javax.jms.TextMessage> |
receiveBulkFromQueue(String queueName,
String selector,
int maxSize,
long timeout,
boolean secure) |
static List<javax.jms.TextMessage> |
receiveBulkFromTopic(String topicName,
String selector,
int maxSize,
long timeout,
boolean secure) |
static javax.jms.TextMessage |
receiveFromQueue(String queueName,
String selector,
long timeout,
boolean secure) |
static javax.jms.TextMessage |
receiveFromTopic(String topicName,
String selector,
long timeout,
boolean secure) |
static javax.jms.TextMessage |
request(String queueName,
String body,
Map<String,Object> headers) |
static javax.jms.TextMessage |
request(String queueName,
String body,
Map<String,Object> headers,
boolean secure,
long receiveTimeout,
long sendTimeout,
int priority) |
static void |
secureMessage(javax.jms.TextMessage txt) |
static void |
sendToDestination(javax.jms.Destination destination,
String body,
Map<String,Object> headers,
boolean secure,
String replyToQueueName,
String correlationId) |
static void |
sendToQueue(String queueName,
String body,
Map<String,Object> headers) |
static void |
sendToQueue(String queueName,
String body,
Map<String,Object> headers,
boolean secure) |
static void |
sendToQueue(String queueName,
String body,
Map<String,Object> headers,
boolean secure,
String replyToQueueName,
String correlationId) |
static void |
sendToQueue(String queueName,
String body,
Map<String,Object> headers,
String replyToQueueName,
String correlationId) |
static void |
sendToTopic(String topicName,
String body,
Map<String,Object> headers) |
static void |
sendToTopic(String topicName,
String body,
Map<String,Object> headers,
boolean secure) |
static void |
start() |
static void |
start(String brokerUrl) |
static void |
stop() |
public static final String SYSPROP_IBROKERURL
public static final String SYSPROP_UPDATE_TOPIC
public static final long REQUEST_TIMEOUT
public static final int MSGPRIORITY
public static void start()
throws InfrastructureException
InfrastructureException - of connection errorpublic static void start(String brokerUrl) throws InfrastructureException
brokerUrl - the URL of the Interconnect message brokerInfrastructureException - of connection errorpublic static void stop()
throws InfrastructureException
InfrastructureException - on disconnect errorpublic static void sendToDestination(javax.jms.Destination destination,
String body,
Map<String,Object> headers,
boolean secure,
String replyToQueueName,
String correlationId)
throws InfrastructureException,
CryptoException
destination - the destinationbody - the request body as Stringheaders - the request headerssecure - enable secure transportreplyToQueueName - the name of the queue to reply to or nullcorrelationId - the correlated idInfrastructureException - on errorsCryptoException - on secure transport errorspublic static void sendToQueue(String queueName, String body, Map<String,Object> headers, boolean secure, String replyToQueueName, String correlationId) throws InfrastructureException, CryptoException
queueName - the name of the queuebody - the request body as Stringheaders - the request headerssecure - enable secure transportreplyToQueueName - the name of the queue to reply to or nullcorrelationId - the correlated idInfrastructureException - on errorsCryptoException - on secure transport errorspublic static void sendToQueue(String queueName, String body, Map<String,Object> headers, boolean secure) throws InfrastructureException, CryptoException
queueName - the name of the queuebody - the request body as Stringheaders - the request headerssecure - enable secure transportInfrastructureException - on errorsCryptoException - on secure transport errorspublic static void sendToQueue(String queueName, String body, Map<String,Object> headers, String replyToQueueName, String correlationId) throws InfrastructureException
queueName - the name of the queuebody - the request body as Stringheaders - the request headersreplyToQueueName - the name of the queue to reply to or nullcorrelationId - the correlated idInfrastructureException - on errorspublic static void sendToQueue(String queueName, String body, Map<String,Object> headers) throws InfrastructureException
queueName - the name of the queuebody - the request body as Stringheaders - the request headersInfrastructureException - on errorspublic static void sendToTopic(String topicName, String body, Map<String,Object> headers, boolean secure) throws InfrastructureException, CryptoException
topicName - the name of the topicbody - the request body as Stringheaders - the request headerssecure - enable secure transportInfrastructureException - on errorsCryptoException - on secure transport errorspublic static void sendToTopic(String topicName, String body, Map<String,Object> headers) throws InfrastructureException
topicName - the name of the topicbody - the request body as Stringheaders - the request headersInfrastructureException - on errors@Deprecated public static javax.jms.TextMessage receive(String queueName, String selector, long timeout, boolean secure) throws InfrastructureException, CryptoException
queueName - the name of the request queueselector - the JMS selector (null or an empty string indicates that there is no selector)timeout - the request timeoutsecure - enable secure transportTextMessageInfrastructureException - on errorsCryptoException - on crypto errorspublic static javax.jms.TextMessage receiveFromQueue(String queueName, String selector, long timeout, boolean secure) throws InfrastructureException, CryptoException
queueName - the name of the request queueselector - the JMS selector (null or an empty string indicates that there is no selector)timeout - the request timeoutsecure - enable secure transportTextMessageInfrastructureException - on errorsCryptoException - on crypto errorspublic static List<javax.jms.TextMessage> receiveBulkFromQueue(String queueName, String selector, int maxSize, long timeout, boolean secure) throws InfrastructureException, CryptoException
queueName - the name of the request queueselector - the JMS selector (null or an empty string indicates that there is no selector)maxSize - Max messages to receivetimeout - the request timeoutsecure - enable secure transportTextMessagesInfrastructureException - on errorsCryptoException - on crypto errorspublic static javax.jms.TextMessage receiveFromTopic(String topicName, String selector, long timeout, boolean secure) throws InfrastructureException, CryptoException
topicName - the name of the topicselector - the JMS selector (null or an empty string indicates that there is no selector)timeout - the request timeoutsecure - enable secure transportTextMessageInfrastructureException - on errorsCryptoException - on crypto errorspublic static List<javax.jms.TextMessage> receiveBulkFromTopic(String topicName, String selector, int maxSize, long timeout, boolean secure) throws InfrastructureException, CryptoException
topicName - the name of the topicselector - the JMS selector (null or an empty string indicates that there is no selector)maxSize - Max messages to receivetimeout - the request timeoutsecure - enable secure transportTextMessagesInfrastructureException - on errorsCryptoException - on crypto errorspublic static javax.jms.TextMessage request(String queueName, String body, Map<String,Object> headers, boolean secure, long receiveTimeout, long sendTimeout, int priority) throws InfrastructureException, CryptoException
queueName - the name of the request queuebody - the request body as Stringheaders - the request headerssecure - enable secure transportreceiveTimeout - the request timeoutsendTimeout - the send timeoutpriority - the message priorityTextMessageInfrastructureException - on errorsCryptoException - on secure transport errorspublic static javax.jms.TextMessage request(String queueName, String body, Map<String,Object> headers) throws InfrastructureException
queueName - the name of the request queuebody - the request body as Stringheaders - the request headersTextMessageInfrastructureException - on errorspublic static boolean isMessageSecure(javax.jms.TextMessage txt)
throws CryptoException,
InfrastructureException
txt - the message to encryptCryptoException - on crypto errorsInfrastructureExceptionpublic static void decryptMessage(javax.jms.TextMessage txt)
throws CryptoException
txt - the message to encryptCryptoException - on crypto errorspublic static void secureMessage(javax.jms.TextMessage txt)
throws javax.jms.JMSException,
CryptoException
txt - the message to encryptjavax.jms.JMSException - on JMS errorsCryptoException - on crypto errorsCopyright © 2016–2018 Taimos GmbH. All rights reserved.