Object methods (public)

void operator = ( const ImqObject & object );

Performs a close if necessary, and copies the instance data from object. The open status will be FALSE.

ImqBoolean alterationDate( ImqString & date );

Provides a copy of the alteration date. It returns TRUE if successful.

ImqString alterationDate( );

Returns the alteration date without any indication of possible errors.

ImqBoolean alterationTime( ImqString & time );

Provides a copy of the alteration time. It returns TRUE if successful.

ImqString alterationTime( );

Returns the alteration time without any indication of possible errors.

ImqString alternateUserId( ) const ;

Returns a copy of the alternate user id.

ImqBoolean setAlternateUserId( const char * id );

Sets the alternate user id. The alternate user id can be set only while the open status is FALSE. This method returns TRUE if successful.

ImqBinary alternateSecurityId( ) const ;

Returns a copy of the alternate security id.

ImqBoolean setAlternateSecurityId( const ImqBinary & token );

Sets the alternate security id. The alternate security id can be set only while the open status is FALSE. The data length of token must be either zero or MQ_SECURITY_ID_LENGTH. It returns TRUE if successful.

ImqBoolean setAlternateSecurityId( const MQBYTE* token = 0);

Sets the alternate security id. token can be zero, which is the same as specifying MQSID_NONE. If token is nonzero, it must address MQ_SECURITY_ID_LENGTH bytes of binary data. When using predefined values such as MQSID_NONE, you might need to make a cast to ensure signature match; for example, (MQBYTE *)MQSID_NONE.

The alternate security id can be set only while the open status is TRUE. It returns TRUE if successful.

ImqBoolean setAlternateSecurityId( const unsigned char * id = 0);

Sets the alternate security id.

ImqBoolean close( );

Sets the open status to FALSE. It returns TRUE if successful.

MQLONG closeOptions( ) const ;

Returns the close options.

void setCloseOptions( const MQLONG options );

Sets the close options.

Manager * connectionReference( ) const ;

Returns the connection reference.

void setConnectionReference( Manager & manager );

Sets the connection reference.

void setConnectionReference( Manager * manager = 0 );

Sets the connection reference.

virtual ImqBoolean description( ImqString & description ) = 0 ;

Provides a copy of the description. It returns TRUE if successful.

ImqString description( );

Returns a copy of the description without any indication of possible errors.

virtual ImqBoolean name( ImqString & name );

Provides a copy of the name. It returns TRUE if successful.

ImqString name( );

Returns a copy of the name without any indication of possible errors.

ImqBoolean setName( const char * name = 0 );

Sets the name. The name can only be set while the open status is FALSE, and, for an Manager, while the connection status is FALSE. It returns TRUE if successful.

ImqObject * nextManagedObject( ) const ;

Returns the next managed object.

ImqBoolean open( );

Changes the open status to TRUE by opening the object as necessary, using amongst other attributes the open options and the name. This method uses the connection reference information and the Manager connect method if necessary to ensure that the Manager connection status is TRUE. It returns the open status.

ImqBoolean openFor( const MQLONG required-options = 0 );

Attempts to ensure that the object is open with open options, or with open options that guarantee the behavior implied by the required-options parameter value..

If required-options is zero, input is required, and any input option suffices. So, if the open options already contain one of:

  • MQOO_INPUT_AS_Q_DEF

  • MQOO_INPUT_SHARED

  • MQOO_INPUT_EXCLUSIVE

the open options are already satisfactory and are not changed; if the open options do not already contain any of the above, MQOO_INPUT_AS_Q_DEF is set in the open options.

If required-options is nonzero, the required options are added to the open options; if required-options is any of the above, the others are reset.

If any of the open options are changed and the object is already open, the object is closed temporarily and reopened in order to adjust the open options.

It returns TRUE if successful. Success indicates that the object is open with appropriate options.

MQLONG openOptions( ) const ;

Returns the open options.

ImqBoolean setOpenOptions( const MQLONG options );

Sets the open options. The open options can be set only while the open status is FALSE. It returns TRUE if successful.

ImqBoolean openStatus( ) const ;

Returns the open status.

ImqObject * previousManagedObject( ) const ;

Returns the previous managed object.

ImqBoolean queueManagerIdentifier( ImqString & id );

Provides a copy of the queue manager identifier. It returns TRUE if successful.

ImqString queueManagerIdentifier( );

Returns the queue manager identifier without any indication of possible errors.