ImqPutMessageOptions

Figure 20. ImqPutMessageOptions class

A Booch class diagram showing the ImqPutMessageOptions class and its parent class, ImqError.

This class encapsulates the MQPMO data structure (see Table 21).

Other relevant classes

ImqError (see ImqError)

ImqMessage (see ImqMessage)

ImqQueue (see ImqQueue)

ImqString (see ImqString)

Object attributes

context reference
An ImqQueue that provides a context for messages. Initially there is no reference.

options
The put message options. The initial value is MQPMO_NONE. The following additional values are possible:

MQPMO_SYNCPOINT

MQPMO_NO_SYNCPOINT

MQPMO_NEW_MSG_ID

MQPMO_NEW_CORREL_ID

MQPMO_LOGICAL_ORDER

MQPMO_NO_CONTEXT

MQPMO_DEFAULT_CONTEXT

MQPMO_PASS_IDENTITY_CONTEXT

MQPMO_PASS_ALL_CONTEXT

MQPMO_SET_IDENTITY_CONTEXT

MQPMO_SET_ALL_CONTEXT

MQPMO_ALTERNATE_USER_AUTHORITY

MQPMO_FAIL_IF_QUIESCING

record fields
The flags that control the inclusion of put message records when a message is put. The initial value is MQPMRF_NONE. The following additional values are possible:

MQPMRF_MSG_ID

MQPMRF_CORREL_ID

MQPMRF_GROUP_ID

MQPMRF_FEEDBACK

MQPMRF_ACCOUNTING_TOKEN

ImqMessageTracker attributes are taken from the ImqQueue object for any field that is specified. ImqMessageTracker attributes are taken from the ImqMessage object for any field that is not specified.

resolved queue manager name
Name of a destination queue manager determined during a put. The initial value is null. This attribute is read-only.

resolved queue name
Name of a destination queue determined during a put. The initial value is null. This attribute is read-only.

syncpoint participation
TRUE when messages are put under syncpoint control.

Constructors

ImqPutMessageOptions( );
The default constructor.

ImqPutMessageOptions( const ImqPutMessageOptions & pmo );
The copy constructor.

Object methods (public)

void operator = ( const ImqPutMessageOptions & pmo );
Instance data is copied from pmo, replacing the existing instance data.

ImqQueue * contextReference( ) const ;
Returns the context reference.

void setContextReference( const ImqQueue & queue );
Sets the context reference.

void setContextReference( const ImqQueue * queue = 0 );
Sets the context reference.

MQLONG options( ) const ;
Returns the options.

void setOptions( const MQLONG options );
Sets the options, including the syncpoint participation value.

MQLONG recordFields( ) const ;
Returns the record fields.

void setRecordFields( const MQLONG fields );
Sets the record fields.

ImqString resolvedQueueManagerName( ) const ;
Returns a copy of the resolved queue manager name.

ImqString resolvedQueueName( ) const ;
Returns a copy of the resolved queue name.

ImqBoolean syncPointParticipation( ) const ;
Returns the syncpoint participation value, which is TRUE if the options include MQPMO_SYNCPOINT.

void setSyncPointParticipation( const ImqBoolean sync );
Sets the syncpoint participation value. If sync is TRUE, the options are altered to include MQPMO_SYNCPOINT, and to exclude MQPMO_NO_SYNCPOINT. If sync is FALSE, the options are altered to include MQPMO_NO_SYNCPOINT, and to exclude MQPMO_SYNCPOINT.

Object data (protected)

MQPMO omqpmo
The MQPMO data structure.

Reason codes

MQRC_STORAGE_NOT_AVAILABLE



© IBM Corporation 2001. All Rights Reserved