|
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 |
java.lang.Object oracle.jdbc.aq.AQDequeueOptions
public class AQDequeueOptions
Specifies the options available for the dequeue operation.
Nested Class Summary | |
---|---|
static class |
AQDequeueOptions.DeliveryFilter
|
static class |
AQDequeueOptions.DequeueMode
|
static class |
AQDequeueOptions.NavigationOption
|
static class |
AQDequeueOptions.VisibilityOption
|
Field Summary | |
---|---|
static java.lang.String |
BUILD_DATE
|
static int |
DEQUEUE_NO_WAIT
|
static int |
DEQUEUE_WAIT_FOREVER
|
static int |
MAX_RAW_PAYLOAD
Default maximum buffer size of a RAW payload. |
static boolean |
TRACE
|
Constructor Summary | |
---|---|
AQDequeueOptions()
Constructs the default dequeue options. |
Method Summary | |
---|---|
java.lang.String |
getCondition()
Returns the dequeue condition. |
java.lang.String |
getConsumerName()
Returns the consumer name. |
java.lang.String |
getCorrelation()
Returns the correlation criterion. |
AQDequeueOptions.DeliveryFilter |
getDeliveryFilter()
Returns the delivery option. |
byte[] |
getDequeueMessageId()
Returns the message id of the message the be dequeued. |
AQDequeueOptions.DequeueMode |
getDequeueMode()
Returns the dequeue mode. |
int |
getMaximumBufferLength()
Returns the max buffer size for RAW queues. |
AQDequeueOptions.NavigationOption |
getNavigation()
Returns the position criterion. |
boolean |
getRetrieveMessageId()
Returns the value of the option that can be set to force the server to return the id of the message during dequeue. |
java.lang.String |
getTransformation()
Returns the value of transformation option. |
AQDequeueOptions.VisibilityOption |
getVisibility()
Returns the visibility parameter. |
int |
getWait()
Returns the wait option. |
void |
setCondition(java.lang.String _condition)
Sets a conditional expression based on the message properties, the message data properties, and PL/SQL functions. |
void |
setConsumerName(java.lang.String consumerName)
Specifies a consumer name. |
void |
setCorrelation(java.lang.String correlation)
Specifies a correlation criterion (or search criterion) for the dequeue operation. |
void |
setDeliveryFilter(AQDequeueOptions.DeliveryFilter delivery)
Use this method to dequeue buffered messages only, persistent messages only or both. |
void |
setDequeueMessageId(byte[] deqMsgId)
Specifies the message identifier of the message to be dequeued. |
void |
setDequeueMode(AQDequeueOptions.DequeueMode deqMode)
Specifies the locking behavior associated with the dequeue operation. |
void |
setMaximumBufferLength(int length)
Sets the maximum number of bytes that will be allocated when dequeueing a message from a RAW queue. |
void |
setNavigation(AQDequeueOptions.NavigationOption navigation)
Specifies the position of the message that will be retrieved. |
void |
setRetrieveMessageId(boolean retrieveIt)
Set this to true in order to retrieve the message id during dequeue. |
void |
setTransformation(java.lang.String _transformation)
Specifies a transformation that will be applied after dequeuing the message. |
void |
setVisibility(AQDequeueOptions.VisibilityOption visibility)
Specifies whether the message is dequeued as part of the current transaction. |
void |
setWait(int wait)
Specifies the wait time if there is currently no message available which matches the search criterion. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEQUEUE_WAIT_FOREVER
public static final int DEQUEUE_NO_WAIT
public static final int MAX_RAW_PAYLOAD
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
Constructor Detail |
---|
public AQDequeueOptions()
Method Detail |
---|
public void setConsumerName(java.lang.String consumerName) throws java.sql.SQLException
consumerName
- the consumer name
java.sql.SQLException
public java.lang.String getConsumerName()
setConsumerName(String)
public void setCorrelation(java.lang.String correlation) throws java.sql.SQLException
For example, if you want to dequeue only messages whose correlation identifier starts with an upper-case "W.", you would set the correlation criterion to:
dequeueOptions.setCorrelation("W%");
correlation
- the correlation criterion
java.sql.SQLException
public java.lang.String getCorrelation()
setCorrelation(String)
public void setDequeueMode(AQDequeueOptions.DequeueMode deqMode) throws java.sql.SQLException
deqMode
- The only valid dequeue modes are:DequeueMode.BROWSE
DequeueMode.LOCKED
DequeueMode.REMOVE
DequeueMode.REMOVE_NODATA
java.sql.SQLException
public AQDequeueOptions.DequeueMode getDequeueMode()
setDequeueMode(DequeueMode)
public void setDequeueMessageId(byte[] deqMsgId) throws java.sql.SQLException
deqMsgId
- message identifier. Can be 'null' to disable dequeue based on
a particular message id.
java.sql.SQLException
public byte[] getDequeueMessageId()
setDequeueMessageId(byte[])
public void setNavigation(AQDequeueOptions.NavigationOption navigation) throws java.sql.SQLException
The default behavior is to retrieve the next message which is available and matches the seatch criterion.
navigation
- The position criterion can be any of the following:
navigation
- the position criterion
java.sql.SQLException
public AQDequeueOptions.NavigationOption getNavigation()
setNavigation(NavigationOption)
public void setVisibility(AQDequeueOptions.VisibilityOption visibility) throws java.sql.SQLException
visibility
- can be:
java.sql.SQLException
public AQDequeueOptions.VisibilityOption getVisibility()
setVisibility(VisibilityOption)
public void setWait(int wait) throws java.sql.SQLException
Valid Values : Any int, but the following predefined constants are provided:
If you use DEQUEUE_WAIT_FOREVER
the dequeue operation will not return
until a message which mathces the seach criterion is available in the queue. You can
however interrupt the dequeue operation by calling connection.cancel();
.
wait
- the wait option
java.sql.SQLException
public int getWait()
setWait(int)
public void setMaximumBufferLength(int length) throws java.sql.SQLException
length
- the max buffer size
java.sql.SQLException
public int getMaximumBufferLength()
setMaximumBufferLength(int)
public void setDeliveryFilter(AQDequeueOptions.DeliveryFilter delivery) throws java.sql.SQLException
Possible valid options are:
delivery
- the delivery options
java.sql.SQLException
public AQDequeueOptions.DeliveryFilter getDeliveryFilter()
setDeliveryFilter(oracle.jdbc.aq.AQDequeueOptions.DeliveryFilter)
public void setRetrieveMessageId(boolean retrieveIt)
retrieveIt
- retrieve message id or not?public boolean getRetrieveMessageId()
setRetrieveMessageId(boolean)
public void setTransformation(java.lang.String _transformation)
Transformations must be created in PLSQL using
DBMS_TRANSFORM.CREATE_TRANSFORMATION(...)
.
For example if the transformation 'OBJ2XML' has been created under the schema
'SCOTT' then it can be specified in the dequeue option with
dequeueOption.setTransformation("SCOTT.OBJ2XML")
.
_transformation
- the transformationpublic java.lang.String getTransformation()
setTransformation(String)
public void setCondition(java.lang.String _condition)
A dequeue condition is specified as a Boolean expression using syntax similar to the WHERE clause of a SQL query. This Boolean expression can include conditions on message properties, user data properties (object payloads only), and PL/SQL or SQL functions (as specified in the WHERE clause of a SQL query). Message properties include priority, corrid and other columns in the queue table
To specify dequeue conditions on a message payload (object payload), use attributes of the object type in clauses. You must prefix each attribute with tab.user_data as a qualifier to indicate the specific column of the queue table that stores the payload. The dequeue condition parameter cannot exceed 4000 characters. If more than one message satisfies the dequeue condition, then the order of dequeuing is undetermined.
_condition
- the dequeue conditionpublic java.lang.String getCondition()
setCondition(String)
|
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 |