Figure 25. ImqTrigger class

This class encapsulates the MQTM data structure (see Table 25). Objects of this class are typically used by a
trigger monitor program, whose task is to wait for these particular messages
and act on them to ensure that other WebSphere MQ applications are started
when messages are waiting for them.
See the IMQSTRG sample program for a usage example.
ImqGetMessageOptions (see ImqGetMessageOptions)
ImqItem (see ImqItem)
ImqMessage (see ImqMessage)
ImqString (see ImqString)
- application id
- Identity of the application that sent the message. The initial
value is a null string.
- application type
- Type of application that sent the message. The initial value is
zero. The following additional values are possible:
MQAT_AIX
MQAT_CICS
MQAT_DOS
MQAT_IMS
MQAT_MVS
MQAT_NOTES_AGENT
MQAT_OS2
MQAT_OS390
MQAT_OS400
MQAT_UNIX
MQAT_WINDOWS
MQAT_WINDOWS_NT
MQAT_USER_FIRST
MQAT_USER_LAST
- environment data
- Environment data for the process. The initial value is a null
string.
- process name
- Process name. The initial value is a null string.
- queue name
- Name of the queue to be started. The initial value is a null
string.
- trigger data
- Trigger data for the process. The initial value is a null
string.
- user data
- User data for the process. The initial value is a null
string.
- ImqTrigger( );
- The default constructor.
- ImqTrigger( const ImqTrigger & trigger );
- The copy constructor.
- virtual ImqBoolean copyOut( ImqMessage &
msg );
- Writes an MQTM data structure to the message buffer, replacing any
existing content. Sets the msg format to
MQFMT_TRIGGER.
See the ImqItem class method description on "ImqItem" for further details.
- virtual ImqBoolean pasteIn( ImqMessage &
msg );
- Reads an MQTM data structure from the message buffer.
To be successful, the ImqMessage format must be
MQFMT_TRIGGER.
See the ImqItem class method description on "ImqItem" for further details.
- void operator = ( const ImqTrigger &
trigger );
- Instance data is copied from trigger, replacing the existing
instance data.
- ImqString applicationId( ) const ;
- Returns a copy of the application id.
- void setApplicationId( const char * id
);
- Sets the application id.
- MQLONG applicationType( ) const ;
- Returns the application type.
- void setApplicationType( const MQLONG type
);
- Sets the application type.
- ImqBoolean copyOut( MQTMC2 * ptmc2 );
- This class encapsulates the MQTM data structure which is the one received
on initiation queues. This method fills in an equivalent MQTMC2 data
structure provided by the caller, and sets the QMgrName field (which is not
present in the MQTM data structure) to all blanks. The MQTMC2 data
structure is traditionally used as a parameter to applications started by a
trigger monitor. This method returns TRUE if successful.
- ImqString environmentData( ) const ;
- Returns a copy of the environment data.
- void setEnvironmentData( const char * data
);
- Sets the environment data.
- ImqString processName( ) const ;
- Returns a copy of the process name.
- void setProcessName( const char * name
);
- Sets the process name, padding with blanks to 48
characters.
- ImqString queueName( ) const ;
- Returns a copy of the queue name.
- void setQueueName( const char * name
);
- Sets the queue name, padding with blanks to 48
characters.
- ImqString triggerData( ) const ;
- Returns a copy of the trigger data.
- void setTriggerData( const char * data
);
- Sets the trigger data.
- ImqString userData( ) const ;
- Returns a copy of the user data.
- void setUserData( const char * data );
- Sets the user data.
- MQTM omqtm
- The MQTM data structure.
MQRC_NULL_POINTER
MQRC_INCONSISTENT_FORMAT
MQRC_ENCODING_ERROR
MQRC_STRUC_ID_ERROR
© IBM Corporation 2001. All Rights Reserved