public interface Queue
This does not expose all the MSMQQueue methods, but is a limited wrapper around the key functionality required to perform MSMQ Integration
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the queue that was previously opened.
|
boolean |
hasMessages(long timeout)
Peek a queue and find out if there are any messages.
|
void |
open(MQOAConstants.AccessMode accessMode)
Open the queue for sending or receiving.
|
void |
open(MQOAConstants.AccessMode accessMode,
MQOAConstants.ShareMode sharedMode)
Open the queue for sending or receiving.
|
void |
purge()
Delete all the messages from the queue.
|
Message |
receive(long timeout)
Receive a message from the queue with a TransactionMode of
MQOAConstants.TransactionMode.MQ_NO_TRANSACTION |
Message |
receive(long timeout,
MQOAConstants.TransactionMode mode)
Receive a message.
|
void |
send(Message msg)
Send the message to this queue with a TransactionMode of
MQOAConstants.TransactionMode.MQ_NO_TRANSACTION |
void |
send(Message msg,
MQOAConstants.TransactionMode mode)
Send the message to this queue.
|
void close() throws MSMQException
MSMQException
- wrapping any underlying exception.void open(MQOAConstants.AccessMode accessMode, MQOAConstants.ShareMode sharedMode) throws MSMQException
accessMode
- the mode.sharedMode
- the shared mode.MSMQException
- wrapping any underlying exception.MQOAConstants.AccessMode
,
MQOAConstants.ShareMode
void open(MQOAConstants.AccessMode accessMode) throws MSMQException
This implies a ShareMode of MQOAConstants.ShareMode.MQ_DENY_NONE
accessMode
- the mode.MSMQException
MQOAConstants.AccessMode
Message receive(long timeout) throws MSMQException
MQOAConstants.TransactionMode.MQ_NO_TRANSACTION
timeout
- the timeout in milliseconds.MSMQException
- wrapping any underlying exceptions.Message receive(long timeout, MQOAConstants.TransactionMode mode) throws MSMQException
timeout
- the timeout in milliseconds.mode
- the transaction mode.MSMQException
- wrapping any underlying exceptions.MQOAConstants.TransactionMode
boolean hasMessages(long timeout) throws MSMQException
timeout
- MSMQException
void send(Message msg, MQOAConstants.TransactionMode mode) throws MSMQException
msg
- the message to be sent.mode
- the transaction modeMSMQException
- wrapping any underlying exceptions.MQOAConstants.TransactionMode
void send(Message msg) throws MSMQException
MQOAConstants.TransactionMode.MQ_NO_TRANSACTION
msg
- the message to be sent.MSMQException
- wrapping any underlying exceptions.MQOAConstants.TransactionMode
void purge() throws MSMQException
MSMQException
- wrapping any underlying exceptions.Copyright Adaptris