Figure 11. ImqGetMessageOptions class

This class encapsulates the MQGMO data structure (see Table 12).
ImqString (see ImqString)
- group status
- Status of a message with respect to a group of messages. The
initial value is MQGS_NOT_IN_GROUP. The following additional values are
possible:
MQGS_MSG_IN_GROUP
MQGS_LAST_MSG_IN_GROUP
- match options
- Options for selecting incoming messages. The initial value is
MQMO_MATCH_MSG_ID | MQMO_MATCH_CORREL_ID. The following
additional values are possible:
MQMO_GROUP_ID
MQMO_MATCH_MSG_SEQ_NUMBER
MQMO_MATCH_OFFSET
MQMO_MSG_TOKEN
MQMO_NONE
- message token
- Message token. A binary value (MQBYTE16) of length
MQ_MSG_TOKEN_LENGTH. The initial value is MQMTOK_NONE.
- options
- Options applicable to a message. The initial value is
MQGMO_NO_WAIT. The following additional values are possible:
MQGMO_WAIT
MQGMO_SYNCPOINT
MQGMO_SYNCPOINT_IF_PERSISTENT
MQGMO_NO_SYNCPOINT
MQGMO_MARK_SKIP_BACKOUT
MQGMO_BROWSE_FIRST
MQGMO_BROWSE_NEXT
MQGMO_BROWSE_MSG_UNDER_CURSOR
MQGMO_MSG_UNDER_CURSOR
MQGMO_LOCK
MQGMO_UNLOCK
MQGMO_ACCEPT_TRUNCATED_MSG
MQGMO_SET_SIGNAL
MQGMO_FAIL_IF_QUIESCING
MQGMO_CONVERT
MQGMO_LOGICAL_ORDER
MQGMO_COMPLETE_MSG
MQGMO_ALL_MSGS_AVAILABLE
MQGMO_ALL_SEGMENTS_AVAILABLE
MQGMO_NONE
- resolved queue name
- Resolved queue name. This attribute is read-only. Names are
never longer than 48 characters and may be padded to that length with
nulls. The initial value is a null string.
- returned length
- Returned length. The initial value is MQRL_UNDEFINED. This
attribute is read-only.
- segmentation
- The capability for segmentation of a message. The initial value is
MQSEG_INHIBITED. The additional value, MQSEG_ALLOWED, is
possible.
- segment status
- The segmentation status of a message. The initial value is
MQSS_NOT_A_SEGMENT. The following additional values are possible:
MQSS_SEGMENT
MQSS_LAST_SEGMENT
- syncpoint participation
- TRUE when messages are retrieved under syncpoint control.
- wait interval
- Length of time that the ImqQueue class get method pauses while
waiting for a suitable message to arrive, if one is not already
available. The initial value is zero, which effects an indefinite
wait. The additional value, MQWI_UNLIMITED, is possible. This
attribute is ignored unless the options include MQGMO_WAIT.
- ImqGetMessageOptions( );
- The default constructor.
- ImqGetMessageOptions( const ImqGetMessageOptions &
gmo );
- The copy constructor.
- void operator = ( const ImqGetMessageOptions &
gmo );
- Instance data is copied from gmo, replacing the existing instance
data.
- MQCHAR groupStatus( ) const ;
- Returns the group status.
- void setGroupStatus( const MQCHAR status
);
- Sets the group status.
- MQLONG matchOptions( ) const ;
- Returns the match options.
- void setMatchOptions( const MQLONG options
);
- Sets the match options.
- ImqBinary messageToken( ) const;
- Returns the message token.
- ImqBoolean setMessageToken( const ImqBinary & token );
- Sets the message token. The data length of
token must be either zero or MQ_MSG_TOKEN_LENGTH. This method
returns TRUE if successful.
- void setMessageToken( const MQBYTE16 token = 0 );
- Sets the message token. token may be zero,
which is the same as specifying MQMTOK_NONE. If token is
nonzero, then it must address MQ_MSG_TOKEN_LENGTH bytes of binary data.
When using predefined values, such as MQMTOK_NONE, it may be necessary to
make a cast to ensure a signature match, for example
(MQBYTE *)MQMTOK_NONE.
- MQLONG options( ) const ;
- Returns the options.
- void setOptions( const MQLONG options
);
- Sets the options, including the syncpoint
participation value.
- ImqString resolvedQueueName( ) const ;
- Returns a copy of the resolved queue name.
- MQLONG returnedLength( ) const;
- Returns the returned length.
- MQCHAR segmentation( ) const ;
- Returns the segmentation.
- void setSegmentation( const MQCHAR value
);
- Sets the segmentation.
- MQCHAR segmentStatus( ) const ;
- Returns the segment status.
- void setSegmentStatus( const MQCHAR status
);
- Sets the segment status.
- ImqBoolean syncPointParticipation( ) const ;
- Returns the syncpoint participation value, which is TRUE if the
options include either MQGMO_SYNCPOINT or
MQGMO_SYNCPOINT_IF_PERSISTENT.
- void setSyncPointParticipation( const ImqBoolean
sync );
- Sets the syncpoint participation value. If sync
is TRUE, the options are altered to include MQGMO_SYNCPOINT, and to
exclude both MQGMO_NO_SYNCPOINT and MQGMO_SYNCPOINT_IF_PERSISTENT. If
sync is FALSE, the options are altered to include
MQGMO_NO_SYNCPOINT, and to exclude both MQGMO_SYNCPOINT and
MQGMO_SYNCPOINT_IF_PERSISTENT.
- MQLONG waitInterval( ) const ;
- Returns the wait interval.
- void setWaitInterval( const MQLONG interval
);
- Sets the wait interval.
- MQGMO omqgmo
- An MQGMO Version 2 data structure. Take care to access MQGMO fields
supported for MQGMO_VERSION_2 only.
This instance data is available for programs compiled on MQSeries Version 5
products.
- PMQGMO opgmo
- The address of an MQGMO data structure. The version number for this
address is indicated in olVersion. Take care to inspect the
version number before accessing MQGMO fields, to ensure they are
present.
This instance data is available for programs compiled on MQSeries Version 5
products.
- MQLONG olVersion
- The version number of the MQGMO data structure addressed by
opgmo.
This instance data is available for programs compiled on MQSeries Version 5
products.
MQRC_BINARY_DATA_LENGTH_ERROR
© IBM Corporation 2001. All Rights Reserved