ImqChannel

Figure 6. ImqChannel class

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

This class encapsulates a channel definition (MQCD) for use during execution of the ImqQueueManager::connect method, for custom client connections. See the description of that method, and the "Hello World" sample program, for more details.

Other relevant classes

ImqBoolean (see Elementary data types)

ImqError (see ImqError)

ImqQueueManager (see ImqQueueManager)

ImqString (see ImqString)

Object attributes

batch heart-beat
The number of milliseconds between checks that a remote channel is active (WebSphere MQ V5.3 and later).The initial value is 0.

channel name
The name of the channel. The initial value is null.

connection name
The name of the connection. For example, the IP address of a host computer. The initial value is null.

heart-beat interval
The number of seconds between checks that a connection is still working. The initial value is 300.

keep alive interval
The number of seconds passed to the communications stack specifying the keep alive timing for the channel (WebSphere MQ V5.3 and later, z/OS only). The initial value is MQKAI_AUTO.

local address
The local communications address for the channel (WebSphere MQ V5.3 and later).

maximum message length
The maximum length of message supported by the channel in a single communication. The initial value is 4 194 304.

mode name
The initial value is null.

password
A password supplied for connection authentication. The initial value is null.

receive exit count
The number of receive exits. The initial value is zero. This attribute is read-only.

receive exit names
The names of receive exits.

receive user data
Data associated with receive exits.

security exit name
The name of a security exit to be invoked on the server side of the connection. The initial value is null.

security user data
Data to be passed to the security exit. The initial value is null.

send exit count
The number of send exits. The initial value is zero. This attribute is read-only.

send exit names
The names of send exits.

send user data
Data associated with send exits.

SSL cipher specification
Cipher specification for use with SSL (WebSphere MQ V5.3 and later).

SSL client authentication type
Client authentication type for use with SSL (WebSphere MQ V5.3 and later).

SSL peer name
Peer name for use with SSL (WebSphere MQ V5.3 and later).

transaction program name
The initial value is null.

transport type
The transport type of the connection. The initial value is MQXPT_LU62.

user id
A user identifier supplied for authorization. The initial value is null.

Constructors

ImqChannel( ) ;
The default constructor.

ImqChannel( const ImqChannel & channel );
The copy constructor.

Object methods (public)

void operator = ( const ImqChannel & channel );
Instance data is copied from channel, replacing any existing instance data.

MQLONG batchHeartBeat( ) const ;
Returns the batch heart-beat (WebSphere MQ V5.3 and later).

ImqBoolean setBatchHeartBeat( const MQLONG heartbeat = 0L );
Sets the batch heart-beat (WebSphere MQ V5.3 and later). This method returns TRUE if successful.

ImqString channelName( ) const ;
Returns the channel name.

ImqBoolean setChannelName( const char * name = 0 );
Sets the channel name. This method returns TRUE if successful.

ImqString connectionName( ) const ;
Returns the connection name.

ImqBoolean setConnectionName( const char * name = 0 );
Sets the connection name. This method returns TRUE if successful.

MQLONG heartBeatInterval( ) const ;
Returns the heart-beat interval.

ImqBoolean setHeartBeatInterval( const MQLONG interval = 300L );
Sets the heart-beat interval. This method returns TRUE if successful.

MQLONG keepAliveInterval( ) const ;
Returns the keep alive interval (WebSphere MQ V5.3 and later, z/OS only).

ImqBoolean setKeepAliveInterval( const MQLONG interval = MQKAI_AUTO );
Sets the keep alive interval (WebSphere MQ V5.3 and later, z/OS only). This method returns TRUE if successful.

ImqString localAddress() const ;
Returns the local address (WebSphere MQ V5.3 and later).

ImqBoolean setLocalAddress ( const char * address = 0 );
Sets the local address (WebSphere MQ V5.3 and later). This method returns TRUE if successful.

MQLONG maximumMessageLength( ) const ;
Returns the maximum message length.

ImqBoolean setMaximumMessageLength( const MQLONG length = 4194304L );
Sets the maximum message length. This method returns TRUE if successful.

ImqString modeName( ) const ;
Returns the mode name.

ImqBoolean setModeName( const char * name = 0 );
Sets the mode name. This method returns TRUE if successful.

ImqString password( ) const ;
Returns the password.

ImqBoolean setPassword( const char * password = 0 );
Sets the password. This method returns TRUE if successful.

size_t receiveExitCount( ) const ;
Returns the receive exit count.

ImqString receiveExitName( );
Returns the first of the receive exit names, if any. If the receive exit count is zero, an empty string is returned.

ImqBoolean receiveExitNames( const size_t count, ImqString * names [ ] );
Returns copies of the receive exit names in names. Any names in excess of receive exit count are set to null strings. This method returns TRUE if successful.

ImqBoolean setReceiveExitName( const char * name = 0 );
Sets the receive exit names to the single name. name may be blank or null. The receive exit count is set to either 1 or zero. The receive user data is cleared. This method returns TRUE if successful.

ImqBoolean setReceiveExitNames( const size_t count, const char * names [ ] );
Sets the receive exit names to names. Individual names values may not be blank or null. The receive exit count is set to count. The receive user data is cleared. This method returns TRUE if successful.

ImqBoolean setReceiveExitNames( const size_t count, const ImqString * names [ ] );
Sets the receive exit names to names. Individual names values may not be blank or null. The receive exit count is set to count. The receive user data is cleared. This method returns TRUE if successful.

ImqString receiveUserData( );
Returns the first of the receive user data items, if any. If the receive exit count is zero, an empty string is returned.

ImqBoolean receiveUserData( const size_t count, ImqString * data [ ] );
Returns copies of the receive user data items in data. Any data in excess of receive exit count is set to null strings. This method returns TRUE if successful.

ImqBoolean setReceiveUserData( const char * data = 0 );
Sets the receive user data to the single item data. If data is nonnull, then receive exit count must be at least 1. This method returns TRUE if successful.

ImqBoolean setReceiveUserData( const size_t count, const char * data [ ] );
Sets the receive user data to data. count must be no greater than the receive exit count. This method returns TRUE if successful.

ImqBoolean setReceiveUserData( const size_t count, const ImqString * data [ ] );
Sets the receive user data to data. count must be no greater than the receive exit count. This method returns TRUE if successful.

ImqString securityExitName( ) const ;
Returns the security exit name.

ImqBoolean setSecurityExitName( const char * name = 0 );
Sets the security exit name. This method returns TRUE if successful.

ImqString securityUserData( ) const ;
Returns the security user data.

ImqBoolean setSecurityUserData( const char * data = 0 );
Sets the security user data. This method returns TRUE if successful.

size_t sendExitCount( ) const ;
Returns the send exit count.

ImqString sendExitName( );
Returns the first of the send exit names, if any. If the send exit count is zero, an empty string is returned.

ImqBoolean sendExitNames( const size_t count, ImqString * names [ ] );
Returns copies of the send exit names in names. Any names in excess of send exit count are set to null strings. This method returns TRUE if successful.

ImqBoolean setSendExitName( const char * name = 0 );
Sets the send exit names to the single name. name may be blank or null. The send exit count is set to either 1 or zero. The send user data is cleared. This method returns TRUE if successful

ImqBoolean setSendExitNames( const size_t count, const char * names [ ] );
Sets the send exit names to names. Individual names values may not be blank or null. The send exit count is set to count. The send user data is cleared. This method returns TRUE if successful.

ImqBoolean setSendExitNames( const size_t count, const ImqString * names [ ] );
Sets the send exit names to names. Individual names values may not be blank or null. The send exit count is set to count. The send user data is cleared. This method returns TRUE if successful.

ImqString sendUserData( );
Returns the first of the send user data items, if any. If the send exit count is zero, an empty string is returned.

ImqBoolean sendUserData( const size_t count, ImqString * data [ ] );
Returns copies of the send user data items in data. Any data in excess of send exit count is set to null strings. This method returns TRUE if successful.

ImqBoolean setSendUserData( const char * data = 0 );
Sets the send user data to the single item data. If data is nonnull, then send exit count must be at least 1. This method returns TRUE if successful.

ImqBoolean setSendUserData( const size_t count, const char * data [ ] );
Sets the send user data to data. count must be no greater than the send exit count. This method returns TRUE if successful.

ImqBoolean setSendUserData( const size_t count, const ImqString * data [ ] );
Sets the send user data to data. count must be no greater than the send exit count. This method returns TRUE if successful.

ImqString sslCipherSpecification( ) const ;
Returns the SSL cipher specification (WebSphere MQ Version 5.3 and later).

ImqBoolean setSslCipherSpecification( const char * name = 0 );
Sets the SSL cipher specification (WebSphere MQ Version 5.3 and later). This method returns TRUE if successful.

MQLONG sslClientAuthentication( ) const ;
Returns the SSL client authentication type (WebSphere MQ Version 5.3 and later).

ImqBoolean setSslClientAuthentication( const MQLONG auth = MQSCA_REQUIRED);
Sets the SSL client authentication type (WebSphere MQ Version 5.3 and later). This method returns TRUE if successful.

ImqString sslPeerName( ) const ;
Returns the SSL peer name (WebSphere MQ Version 5.3 and later).

ImqBoolean setSslPeerName( const char * name = 0 );
Sets the SSL peer name (WebSphere MQ Version 5.3 and later). This method returns TRUE if successful.

ImqString transactionProgramName( ) const ;
Returns the transaction program name.

ImqBoolean setTransactionProgramName( const char * name = 0 );
Sets the transaction program name. This method returns TRUE if successful.

MQLONG transportType( ) const ;
Returns the transport type.

ImqBoolean setTransportType( const MQLONG type = MQXPT_LU62 );
Sets the transport type. This method returns TRUE if successful.

ImqString userId( ) const ;
Returns the user id.

ImqBoolean setUserId( const char * id = 0 );
Sets the user id. This method returns TRUE if successful.

Reason codes

MQRC_DATA_LENGTH_ERROR

MQRC_ITEM_COUNT_ERROR

MQRC_NULL_POINTER

MQRC_SOURCE_BUFFER_ERROR



© IBM Corporation 2001. All Rights Reserved