|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQMessageProperties
This interface contains the message properties such as Correlation, Sender, Delay and Expiration, Recipients, and Priority and Ordering. Some of these properties such as the enqueue timestamp or the count of dequeue attempts cannot be set by the user: they are retrieved from the server during a dequeue operation.
When enqueuing a new message in a queue, you first need to retrieve a new instance of
this interface by calling AQFactory.createAQMessageProperties()
. Fill the
message properties and then call AQFactory.createAQMessage(props)
to
create a new AQ message with props
being the message properties. Finally
set the payload and then enqueue the message.
AQFactory.createAQMessageProperties
Nested Class Summary | |
---|---|
static class |
AQMessageProperties.DeliveryMode
|
static class |
AQMessageProperties.MessageState
|
Field Summary | |
---|---|
static int |
MESSAGE_NO_DELAY
Possible value for setDelay. |
static int |
MESSAGE_NO_EXPIRATION
The message will never expire. |
Method Summary | |
---|---|
java.lang.String |
getCorrelation()
|
int |
getDelay()
|
AQMessageProperties.DeliveryMode |
getDeliveryMode()
After a dequeue operation, call this method to find out if the message was enqueued in a persistent manner or not. |
int |
getDequeueAttemptsCount()
Returns the number of attempts that have been made to dequeue the message. |
java.sql.Timestamp |
getEnqueueTime()
Returns the time the message was enqueued. |
java.lang.String |
getExceptionQueue()
|
int |
getExpiration()
|
byte[] |
getPreviousQueueMessageId()
The ID of the message in the last queue that generated this message. |
int |
getPriority()
|
AQAgent[] |
getRecipientList()
|
AQAgent |
getSender()
|
AQMessageProperties.MessageState |
getState()
Returns the state of the message at the time of the dequeue. |
java.lang.String |
getTransactionGroup()
For transaction-grouped queues, this identifies the transaction group of the message. |
void |
setCorrelation(java.lang.String correlation)
Specifies the identification supplied by the producer for a message at enqueuing. |
void |
setDelay(int delay)
Specifies the number of seconds to delay the enqueued message. |
void |
setExceptionQueue(java.lang.String exceptionQueue)
Specifies the name of the queue to which the message is moved to if it cannot be processed successfully. |
void |
setExpiration(int seconds)
Specifies the expiration of the message. |
void |
setPriority(int priority)
Specifies the priority of the message. |
void |
setRecipientList(AQAgent[] agents)
This parameter is only valid for queues which allow multiple consumers. |
void |
setSender(AQAgent sender)
Identifies the original sender of a message. |
java.lang.String |
toString()
|
Field Detail |
---|
static final int MESSAGE_NO_DELAY
static final int MESSAGE_NO_EXPIRATION
Method Detail |
---|
int getDequeueAttemptsCount()
void setCorrelation(java.lang.String correlation) throws java.sql.SQLException
java.sql.SQLException
java.lang.String getCorrelation()
void setDelay(int delay) throws java.sql.SQLException
java.sql.SQLException
int getDelay()
java.sql.Timestamp getEnqueueTime()
void setExceptionQueue(java.lang.String exceptionQueue) throws java.sql.SQLException
java.sql.SQLException
java.lang.String getExceptionQueue()
void setExpiration(int seconds) throws java.sql.SQLException
java.sql.SQLException
int getExpiration()
AQMessageProperties.MessageState getState()
void setPriority(int priority) throws java.sql.SQLException
java.sql.SQLException
int getPriority()
void setRecipientList(AQAgent[] agents) throws java.sql.SQLException
java.sql.SQLException
AQAgent[] getRecipientList()
void setSender(AQAgent sender) throws java.sql.SQLException
java.sql.SQLException
AQAgent getSender()
java.lang.String getTransactionGroup()
byte[] getPreviousQueueMessageId()
AQMessageProperties.DeliveryMode getDeliveryMode()
Note that this is set at dequeue time by the driver. There is an enqueue option to enqueue a buffered message.
java.lang.String toString()
toString
in class java.lang.Object
|
Oracle JDBC API Reference 11g Release 2 ("11.2.0.3.0") |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |