|
Oracle®Database JDBC Java API Reference 12c Release 1 (12.1.0.2) E56669-01 |
|||||||||
| 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_DELAYPossible value for setDelay. |
static int |
MESSAGE_NO_EXPIRATIONThe message will never expire. |
| Method Summary | |
|---|---|
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. |
Timestamp |
getEnqueueTime()Returns the time the message was enqueued. |
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. |
String |
getTransactionGroup()For transaction-grouped queues, this identifies the transaction group of the message. |
void |
setCorrelation(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(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. |
String |
toString() |
| Field Detail |
|---|
static final int MESSAGE_NO_DELAY
static final int MESSAGE_NO_EXPIRATION
| Method Detail |
|---|
int getDequeueAttemptsCount()
void setCorrelation(String correlation)
throws SQLException
SQLExceptionString getCorrelation()
void setDelay(int delay)
throws SQLException
SQLExceptionint getDelay()
Timestamp getEnqueueTime()
void setExceptionQueue(String exceptionQueue)
throws SQLException
SQLExceptionString getExceptionQueue()
void setExpiration(int seconds)
throws SQLException
SQLExceptionint getExpiration()
AQMessageProperties.MessageState getState()
void setPriority(int priority)
throws SQLException
SQLExceptionint getPriority()
void setRecipientList(AQAgent[] agents)
throws SQLException
SQLExceptionAQAgent[] getRecipientList()
void setSender(AQAgent sender)
throws SQLException
SQLExceptionAQAgent getSender()
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.
String toString()
toString in class Object
|
Oracle®Database JDBC Java API Reference 12c Release 1 (12.1.0.2) E56669-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||