public class TemporaryQueueExecutor extends java.lang.Object implements QueueExecutor
Constructor and Description |
---|
TemporaryQueueExecutor(javax.jms.QueueSession session,
javax.jms.Queue destination,
int timeoutMs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the resources
|
javax.jms.Message |
sendAndReceive(javax.jms.Message request,
int deliveryMode,
int priority,
long expiration)
Sends and receives a message.
|
public TemporaryQueueExecutor(javax.jms.QueueSession session, javax.jms.Queue destination, int timeoutMs) throws javax.jms.JMSException
session
- the session to use to send the messagedestination
- the queue to send the message ontimeoutMs
- Timeout in millisjavax.jms.JMSException
- when internally used QueueRequestor
can not be
constructed with session
and
destination
public javax.jms.Message sendAndReceive(javax.jms.Message request, int deliveryMode, int priority, long expiration) throws javax.jms.JMSException
sendAndReceive
in interface QueueExecutor
request
- the message to senddeliveryMode
- the delivery mode to usepriority
- the priority for this messageexpiration
- messages lifetime in msnull
javax.jms.JMSException
- in case of an exception from the messaging systempublic void close() throws javax.jms.JMSException
QueueExecutor
close
in interface QueueExecutor
javax.jms.JMSException
- in case of an exception from the messaging systemCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.