AQQueue - Oracle 9i

This interface supports the operational interfaces of queues. AQQueue extends AQQueueAdmin.Hence, you can also use administrative functions through thisinterface.

Methods

getOwner

public java.lang.String getOwner() throws AQException

This method gets the queue owner.

getName

public java.lang.String getName() throws AQException

This method gets the queue name.

getQueueTableName

public java.lang.String getQueueTableName() throws AQException

This method gets the name of the queue table in which the queue resides.

getProperty

public AQQueueProperty getProperty() throws AQException

This method is used to get the queue properties.

Returns

AQQueueProperty object

createMessage

public AQMessage createMessage() throws AQException

This method is used to create a new AQMessage object that can be populated with data to be enqueued.

Returns

AQMessage object

enqueue

public byte[] enqueue(AQEnqueueOption enq_option,AQMessage message) throws AQException

This method is used to enqueue a message in a queue.

enqueue a message in a queue.

Returns

Message id of the enqueued message. The AQMessage object’s messageId field is also populated after the completion of this call.

dequeue

This method is used to dequeue a message from a queue.

dequeue a message from a queue.

Returns

AQMessage, the dequeued message

dequeue (for queues with Oracle object type payloads - SQL data version)

This method is used to dequeue a message from a queue containing Oracle object payloads. This version must be used if your program uses the SQL Data interface for mapping java classes to Oracle object types.

Parameters
deq_option - AQDequeueOption object

payload_class - the payload dequeued is transformed as an object of this type.

The class specified must implement the SQLData interface and correspond to the payload type defined for the queue.
Returns

AQMessage,the dequeued message

Users are also required to register all java classes that map to ADTs contained in the queue in the typeMap of the JDBC connection.

dequeue (for queues with Oracle object type payloads - Custom Datum version)

This method is used to dequeue a message from a queue containing Oracle object payloads. This version must be used if your program uses the Custom Datum interface for mapping java classes to Oracle object types.

Parameters:

deq_option - AQDequeueOption object

payload_fact - This is the CustomDatum factory for the class that maps to the SQL ADT type of the payload in the queue. For example, if Person is the java class that maps to PERSON ADT in the database, then the CustomDatum factory for this class can be obtained using Person.getFactory()
Returns

AQMessage - the dequeued message

getSubscribers

public AQAgent[] getSubscribers() throws AQException

This method is used to get a subscriber list for the queue.

Returns
An array of AQAgents

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Oracle 9i Topics