Oracle® C++ Call Interface Programmer's Guide 10g Release 2 (10.2) Part Number B14294-01 |
|
|
View PDF |
The Producer
enqueues Message
s into a queue and defines the enqueue options.
Table 12-32 Enumerated Values Used by Producer Class
Attribute | Options |
---|---|
EnqueueSequence |
|
Visibility |
|
Table 12-33 Summary of Producer Methods
Method | Summary |
---|---|
Producer() |
Producer class constructor. |
getQueueName() |
Retrieves the name of a queue on which the Message s will be enqueued. |
getRelativeMessageId() |
Retrieves the Message id that is referenced in a sequence deviation operation. |
getSequenceDeviation() |
Retrieves information regarding whether the Message should be dequeued ahead of other Message s in the queue. |
getTransformation() |
Retrieves the transformation applied before a Message is enqueued. |
getVisibility() |
Retrieves the transactional behavior of the enqueue request. |
isNull() |
Tests whether the Producer is NULL . |
send() |
Enqueues and sends a Message . |
operator=() |
Assignment operator for Producer .. |
setNull() |
Frees memory if the scope of the Producer extends beyond the Connection on which it was created. |
setQueueName() |
Specifies the name of a queue on which the Message s will be enqueued. |
setRelativeMessageId() |
Specifies the Message id to be referenced in the sequence deviation operation. |
setSequenceDeviation() |
Specifies whether Message should be dequeued before other Message s already in the queue. |
setTransformation() |
Specifies transformation applied before enqueuing a Message . |
setVisibility() |
Specifies transaction behavior of the enqueue request. |
Producer
object constructor.
Syntax | Description |
---|---|
Producer( const Connection *conn); |
Creates a Producer object with the specified Connection . |
Producer( const Connection *conn, const string& queue); |
Creates a Producer object with the specified Connection and queue name. |
Parameter | Description |
---|---|
conn |
The connection of the new Producer object. |
queue |
The queue that will be used by the new Producer object. |
Retrieves the name of a queue on which the Message
s will be enqueued.
Syntax
string getQueueName() cosnt;
Retrieves the Message
id that is referenced in a sequence deviation operation. Used only if a sequence deviation is specified; ignored otherwise.
Syntax
Bytes getRelativeMessageId() const;
Retrieves information regarding whether the Message
should be dequeued ahead of other Message
s in the queue. Valid return values are ENQ_BEFORE
and ENQ_TOP
, as defined in Table 12-32.
Syntax
EnqueueSequence getSequenceDeviation() const;
Retrieves the transformation applied before a Message
is enqueued.
Syntax
string getTransformation() const;
Retrieves the transactional behavior of the enqueue request. Visiblity
is defined in Table 12-32.
Syntax
Visibility getVisibility() const;
Tests whether the Producer
is NULL
. If the Producer
is NULL
, then TRUE
is returned; otherwise, FALSE
is returned.
Syntax
bool isNull() const;
The assignment operator for Producer
.
Syntax
void operator=( const Producer& prod);
Parameter | Description |
---|---|
prod |
The original Producer |
Enqueues and sends a Message
.
Syntax | Description |
---|---|
Bytes send( Message& msg); |
Used when queueName has been previously set by the setQueueName() method. |
Bytes send( Message& msg, string& queue); |
Enqueue the Message to the specified queueName . |
Parameter | Description |
---|---|
msg |
The Message that will be enqueued. |
queue |
The name of a valid queue in the database. |
Frees memory associated with the Producer
. Unless working in inner scope, this call should be made before terminating the Connection
.
Syntax
void setNull();
Specifies the name of a queue on which the Message
s will be enqueued. Typically used when enqueuing multiple messages to the same queue.
Syntax
void setQueueName( const string& queue);
Parameter | Description |
---|---|
queue |
The name of a valid queue in the database, to which the Message s will be enqueued. |
Specifies the Message
id to be referenced in the sequence deviation operation. If the sequence deviation is not specified, this parameter will be ignored. Can be set for each enqueuing of a Message
.
Syntax
void setRelativeMessageId( const Bytes& msgid);
Parameter | Description |
---|---|
msgid |
The id of the relative Message . |
Specifies whether Message
being enqueued should be dequeued before other Message
(s) already in the queue. Can be set for each enqueuing of a Message
.
Syntax
void setSequenceDeviation( EnqueueSequence option);
Parameter | Description |
---|---|
option |
The enque sequence being set, defined in Table 12-32. |
Specifies transformation function applied before enqueuing the Message
.
Syntax
void setTransformation( string &fName);
Parameter | Description |
---|---|
fName |
SQL transformation function. |
Specifies transaction behavior of the enqueue request. Can be set for each enqueuing of a Message
.
Syntax
void setVisibility( Visibility option);
Parameter | Description |
---|---|
option |
Visibility option being set, defined in Table 12-32. |