Skip Headers
Oracle® C++ Call Interface Programmer's Guide,
11g Release 2 (11.2)

Part Number E10764-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
LNCPP1029

Producer Class

The Producer enqueues Messages into a queue and defines the enqueue options.

LNCPP21381Table 13-33 Enumerated Values Used by Producer Class

Attribute Options
EnqueueSequence
  • ENQ_BEFORE indicates that the message is enqueued before the message specified by the related message id.

  • ENQ_TOP indicates that the message is enqueued before any other messages.

Visibility
  • ENQ_IMMEDIATE indicates that the enqueue is not part of the current transaction. The operation constitutes a transaction of its own.

  • ENQ_ON_COMMIT indicates that the enqueue is part of the current transaction. The operation is complete when the transaction commits. This is the default setting.


LNCPP21382Table 13-34 Summary of Producer Methods

Method Summary

Producer()

Producer class constructor.

getQueueName()

Retrieves the name of a queue on which the Messages is 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 Messages 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 Messages is enqueued.

setRelativeMessageId()

Specifies the Message id to be referenced in the sequence deviation operation.

setSequenceDeviation()

Specifies whether Message should be dequeued before other Messages in the queue.

setTransformation()

Specifies transformation applied before enqueuing a Message.

setVisibility()

Specifies transaction behavior of the enqueue request.


LNCPP21383

Producer()

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 is used by the new Producer object.

LNCPP21384

getQueueName()

Retrieves the name of a queue on which the Messages are enqueued.

LNCPP21385Syntax

string getQueueName() cosnt;
LNCPP21386

getRelativeMessageId()

Retrieves the Message id that is referenced in a sequence deviation operation. Used only if a sequence deviation is specified; ignored otherwise.

LNCPP21387Syntax

Bytes getRelativeMessageId() const;
LNCPP21388

getSequenceDeviation()

Retrieves information regarding whether the Message should be dequeued ahead of other Messages in the queue. Valid return values are ENQ_BEFORE and ENQ_TOP, as defined in Table 13-33.

LNCPP21389Syntax

EnqueueSequence getSequenceDeviation() const;
LNCPP21390

getTransformation()

Retrieves the transformation applied before a Message is enqueued.

LNCPP21391Syntax

string getTransformation() const;
LNCPP21392

getVisibility()

Retrieves the transactional behavior of the enqueue request. Visibility is defined in Table 13-33.

LNCPP21393Syntax

Visibility getVisibility() const;
LNCPP21394

isNull()

Tests whether the Producer is NULL. If the Producer is NULL, then TRUE is returned; otherwise, FALSE is returned.

LNCPP21395Syntax

bool isNull() const;
LNCPP21396

operator=()

The assignment operator for Producer.

LNCPP21397Syntax

void operator=(
   const Producer& prod);
Parameter Description
prod
The original Producer

LNCPP21398

send()

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 is enqueued.
queue
The name of a valid queue in the database.

LNCPP21399

setNull()

Frees memory associated with the Producer. Unless working in inner scope, this call should be made before terminating the Connection.

LNCPP21400Syntax

void setNull();
LNCPP21401

setQueueName()

Specifies the name of a queue on which the Messages are enqueued. Typically used when enqueuing multiple messages to the same queue.

LNCPP21402Syntax

void setQueueName(
   const string& queue);
Parameter Description
queue
The name of a valid queue in the database, to which the Messages are enqueued.

LNCPP21403

setRelativeMessageId()

Specifies the Message id to be referenced in the sequence deviation operation. If the sequence deviation is not specified, this parameter is ignored. Can be set for each enqueuing of a Message.

LNCPP21404Syntax

void setRelativeMessageId(
   const Bytes& msgid);
Parameter Description
msgid
The id of the relative Message.

LNCPP21405

setSequenceDeviation()

Specifies whether Message being enqueued should be dequeued before other Message(s) in the queue. Can be set for each enqueuing of a Message.

LNCPP21406Syntax

void setSequenceDeviation(
   EnqueueSequence option);
Parameter Description
option
The enqueue sequence being set, defined in Table 13-33.

LNCPP21407

setTransformation()

Specifies transformation function applied before enqueuing the Message.

LNCPP21408Syntax

void setTransformation(
   string &fName);
Parameter Description
fName
SQL transformation function.

LNCPP21409

setVisibility()

Specifies transaction behavior of the enqueue request. Can be set for each enqueuing of a Message.

LNCPP21410Syntax

void setVisibility(
   Visibility option);
Parameter Description
option
Visibility option being set, defined in Table 13-33.

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Page

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF