| Constructor and Description |
|---|
JmsReceiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
javax.jms.ObjectMessage |
from(javax.jms.Destination destination)
Receives message from the given destination.
|
JmsClient.JmsReceiver |
inTransaction()
Receives the message in transaction (i.e.
|
JmsClient.JmsReceiver |
noAutoClose()
Won't close the connection automatically upon completion, allowing to reuse given connection.
|
JmsClient.JmsReceiver |
noWait()
Don't block and returns the message what is in the queue, if there is none queued, then returns null immediately.
|
JmsClient.JmsReceiver |
withAcknowledgeMode(int acknowledgeMode)
Sets the message acknowledgement mode.
|
JmsClient.JmsReceiver |
withSelector(String selector,
Object... args)
Specifies a selector used to query messages from a destination.
|
JmsClient.JmsReceiver |
withTimeout(long timeout)
Waits specific number of milliseconds for a message to eventually appear in the queue, or returns null if there was no message queued in given interval.
|
public JmsClient.JmsReceiver inTransaction()
public JmsClient.JmsReceiver withSelector(String selector, Object... args)
String.format(String, Object...).selector - specifies to query messages from a destination.args - argument for the selectorString.format(String, Object...)public JmsClient.JmsReceiver noWait()
public JmsClient.JmsReceiver withTimeout(long timeout)
timeout - wait untilpublic JmsClient.JmsReceiver withAcknowledgeMode(int acknowledgeMode)
acknowledgeMode - JMS acknowledge mode as in Sessionpublic JmsClient.JmsReceiver noAutoClose()
public void close()
public javax.jms.ObjectMessage from(javax.jms.Destination destination)
destination - where to receive fromObjectMessageCopyright © 2017 JBoss by Red Hat. All rights reserved.