Contents

 

CLookupHelper

The CLookupHelper class is an abstract base class. The CLookupHelper helper provides methods to lookup connection factories and destinations.

Inheritance Hierarchy

None

Subclasses

  • CTopicConnectionFactory
  • CQueueConnectionFactory
  • CFioranoConnectionFactory
  • CAdminConnectionFactory
  • CGenericAdminObject
  • CQueue
  • CTopic

Constructors

CLookupHelper()

Default constructor

Methods

virtual AdminObjectType getLookupObjectType() FMQCONST throw (CJMSException *) = 0

Returns the type of the looked up administered object.

           Parameters: None

           Returns: Returns  enum AdminObjectType, the looked up Object type.

           Exceptions: CJMSException

CInitialContext

The CInitialContext class is used to bind to a local or a remote FioranoMQ Server in order to perform lookup() operations on administered objects such as Topics, Queues and Connection Factories.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CInitialContext() throw (CJMSException *);

Initial context with default parameters

         Parameters: None

 

CInitialContext(CHashTable *env) throw (CJMSException*);

Creates an initial context using the supplied environment variables.

         Parameters:  env - CHashtable to map key value pairs.

         Example:                 

              m_env->Put(SECURITY_PRINCIPAL, m_usrName);
              m_env->Put(SECURITY_CREDENTIALS,m_usrPasswd);
              m_env->Put(CONNECT_URL,m_providerURL);
              m_env->Put(BACKUP_URLS,m_backupURL);
              m_env->Put(PROVIDER_URL,m_providerURL);

Methods

CLookupHelper* Lookup(mqcstring adminObjectName) FMQCONST throw (CJMSException *);      

Retrieves the named object of type CLookupHelper class. The CLookupHelper class can be dynamically casted to one of:

  • CTopicConnectionFactory
  • CQueueConnectionFactory 
  • CFioranoConnectionFactory
  • CAdminConnectionFactory 
  • CGenericAdminObject
  • CQueue
  • CTopic

One can use the CLookupHelper’s getLookupObjectType() to get the type of the retrieved administered object.

        Parameters:  adminObjectName – Name of the administered object to be looked up.

        Returns: CLookupHelper

        Exceptions: CJMSException.    

 

CLookupHelper* LookupTCF(mqcstring adminObjectName) FMQCONST throw (CJMSException *);

Retrieves the named administered object from FioranoMQ’s JNDI store. This method is used in the scenario of serverless mode.

       Parameters: adminObjectName – Name of the administered object to be looked up.

       Returns: CLookupHelper

       Exceptions: CJMSException.    

 

CLookupHelper* LookupQCF(mqcstring adminObjectName) FMQCONST throw (CJMSException *);

Retrieves the named administered object from FioranoMQ’s JNDI store. This method is used in the scenario of serverless mode.

        Parameters: adminObjectName – Name of the administered object to be looked up.

        Returns: CLookupHelper

        Exceptions: CJMSException.

 

CAdvisoryMessage

The CAdvisoryMessage class defines methods that return the connection state of the application with the server.

Inheritance Hierarchy

None

Constructors

CAdvisoryMessage(struct _MQAdvisoryMessage *msg);

CAdvisoryMessage constructor.

           Parameters: The MQAdvisoryMessage structure as defined in C runtime library.

Subclasses

None

Methods

mqcstring_unicode getAdvisoryMsgString() throw (CJMSException*);

Gets the advisory message describing the connection status.

         Parameters: None

         Returns: The Advisory message string (const char*).

         Exceptions: CJMSException.    

 

mqint getAMState()throw (CJMSException *);

Gets the state of the connection with the server.

        Parameters: None

        Returns: The state of the connection with the server.

        Exceptions: CJMSException.    

 

mqboolean isActive() throw (CJMSException *);

Returns TRUE (1) if the connection with the server is alive.

       Parameters: None

       Returns: 1 – If the connection state is active    0 – Inactive.

      Exceptions: CJMSException.    

 

mqboolean isRevalidating() throw (CJMSException *);

Returns TRUE (1) if the connection is trying to revalidate with the server.

        Parameters: None

        Returns:

                    TRUE – If the connection is trying to revalidate

                     FALSE – If the connection is not trying to revalidate

        Exceptions: CJMSException.    

 

mqboolean isDisconnected() throw (CJMSException *);

Returns TRUE if the connection with the server is down.

      Parameters: None

      Returns: TRUE – If the connection is down FALSE – If the connection is active

      Exceptions: CJMSException.

 

mqboolean isTransferring()throw (CJMSException *);

True if connection is transferring messages from CSP (Client Side Persistence)

      Parameters: None

      Returns:1 – TRUE 0 – FALSE

      Exceptions: CJMSException.

 

mqboolean isTransferComplete()throw (CJMSException *);

True if connection has completed transferring CSP messages.

     Parameters: None

     Returns: 1 – TRU 0 – FALSE

     Exceptions: CJMSException.

CAdvisoryMsgListener

An application uses CAdvisoryMsgListener to receive Advisory message on the connection state.

Inheritance Hierarchy

None

Subclasses

None

Methods

virtual void onAdvisoryMessage(CAdvisoryMessage *msg) = 0;

Application user must implement the ‘onAdvisoryMessage’ to receive Advisory messages. See more information on Advisory Message Listeners, section Advisory Message listeners in C++.

             Parameters: msg – CAdvisoryMessage Object

             Returns: void

             Exceptions: None

CFioranoException

This is the base class for all exceptions defined in the Fiorano framework.

Inheritance Hierarchy

None

Subclasses

CJMSException

Constructors

CFioranoException(mqcstring str);

Constructs a new CFioranoException object with the provided error code string.

            Parameters: str – String representing the errorcode

CFioranoException(mqcstring errCode, mqcstring errDesc);

Constructs a new CFioranoException object with the provided error code string and error description.

          Parameters:

                     errCode – String representing the error code.

                     errDesc -  String representing the error description

Methods

static void checkForException()   throw (CJMSException *)

Utility function that throws CJMSException if an exception had occurred.

           Parameters: None

           Returns: void

           Exceptions: CJMSException

static void checkForException(mqcstring errCode)

Overloaded utility function that throws CJMSException if an exception had occurred with the provided errCode.Parameters: errorcode – String representing the errorcodeReturns: void

static void checkForException(mqcstring errCode, mqcstring errDesc)

Overloaded utility function that throws CJMSException if an exception had occurred with the provided errCode and errDesc.

            Parameters:

                 errCode: The error code that identifies the error
                 errDesc: Description of the error

          Returns: void

const DN_STRING getLastErrorCode() FMQCONST

Returns the last error code as string

          Parameters: None

          Returns: DN_STRING(mqstring)

const DN_STRING getMessage() FMQCONST

The associated error message can be read.

          Parameters: None

          Returns: DN_STRING(mqstring)

CJMSException

Constructs a CJMSException with the specified reason and with the error code.

Inheritance Hierarchy

Subclasses

None

Constructors

CJMSException(mqcstring errCode)

Constructs a new CJMSException object with the provided error code string.

Parameters: errCode – The errorcode that identifies the error

CJMSException(mqcstring errCode, mqcstring errDesc)

Constructs a new CJMSException object with the provided error code string and error description.

Parameters:

  • errCode: The error code that identifies the error
  • errDesc: Description of the error

 

CJMSException(mqcstring errCode, CJMSException *linkedException)

Constructs a new CJMSException object with the provided error code string and linked exception.

Parameters:

  • errCode: The error code that identifies the error
  • linkedException: The pointer to the CJMSException which acts as linked exception

 

CJMSException(mqcstring errCode, mqcstring errDesc, CJMSException *linkedException)

Constructs a new CJMSException object with the provided error code string and linked exception and error description.

Parameters:

  • errCode: The error code that identifies the error
  • errDesc: Description of the error
  • linkedException: The pointer to the CJMSException which acts as linked exception.

Methods

CJMSException(mqcstring errCode)

Constructs a new CJMSException object with the provided error code string.

Parameters: errCode – The errorcode that identifies the error

CJMSException(mqcstring errCode, mqcstring errDesc)

Constructs a new CJMSException object with the provided error code string and error description.

Parameters:

  • errCode: The error code that identifies the error
  • errDesc: Description of the error

 

CJMSException(mqcstring errCode, CJMSException *linkedException)

Constructs a new CJMSException object with the provided error code string and linked exception.

Parameters:

  • errCode: The error code that identifies the error
  • linkedException: The pointer to the CJMSException which acts as linked exception

 

CJMSException(mqcstring errCode, mqcstring errDesc, CJMSException *linkedException)

Constructs a new CJMSException object with the provided error code string and linked exception and error description.

Parameters:

  • errCode: The error code that identifies the error
  • errDesc: Description of the error
  • linkedException: The pointer to the CJMSException which acts as linked exception.

Methods

void printStackTrace()

Prints the function stack trace on the console.

Parameters: None

Returns: void

 

const DN_STRING getStackTrace()

Gets the stack trace of the function.

Parameters: None

Returns: Returns the stack trace as DN_STRING (mqstring).

 

const DN_STRING getErrorCode()

Gets the vendor specific error code.

Parameters: None

Returns: The vendor specific error code.

 

CJMSException *getLinkedException()

Gets the exception linked to this one.

Parameters: None

Returns: The linked exception

CExceptionListener

If FioranoMQ cpp detects a serious problem with a CConnection object, it informs the CConnection object's CExceptionListener, if one has been registered. It does this by calling the listener's onException method, passing it a CJMSException argument describing the problem.

Inheritance Hierarchy

None

Subclasses

None

Constructors

Default

Methods

virtual void onException(CFioranoException *msg) = 0

Notifies the user of JMS exception. The user is expected to override this function with the required functionality.

Parameters: msg – FioranoException object

Returns: Void

CMessageListener

A CMessageListener object is used to receive asynchronously delivered messages. Passes a message to the listener.

Inheritance Hierarchy

None

Subclasses

None

Constructors

Default

Methods

virtual void onMessage(CMessage *msg) = 0

Notifies the user with message received. The user is expected to override this function with the required functionality.

Parameters: msg – Message object

           Returns: Void

CAdminConnectionFactory

The Admin connection Factory used for creating Admin connections to the FioranoMQ Server.

Inheritance Hierarchy

Subclasses

None

Methods

CAdminConnection *createAdminConnection(mqcstring username, mqcstring password) throw (CJMSException *);

Creates an Admin connection with the FioranoMQ Server using the specified user credentials. The username provided must belong to the Administrators group of FioranoMQ Security realm.

Parameters:

  • username: user who belongs Administrators group of Fiorano Security realm
  • password: password         

Returns: CAdminConnection

Exceptions: CJMSException

 

CAdminConnection *createAdminConnectionDefParams()              throw (CJMSException *);

Creates an Admin connection with the FioranoMQ Server using default credentials.

Parameters: None        

Returns: CAdminConnection

Exceptions: CJMSException

 

AdminObjectType getLookupObjectType() FMQCONST throw (CJMSException *);

This function will returns the type of looked up Object. The return value AdminObjectType is enum of:

  • OBJID_QCF, (QueueConnectionFactory )
  • OBJID_TCF, (TopicConnectionFactory )
  • OBJID_QUEUE, (Queue destination )
  • OBJID_TOPIC,   (Topic destination )
  • OBJID_GAO, (GenericAdminObject)
  • OBJID_ACF, (AdminConnectionFactory)
  • OBJID_UCF, (UnifiedConnectionFactory)

Parameters: None

Returns: AdminObjectType

Exceptions: CJMSException

CConnectionFactory

A ConnectionFactory object encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a connection with a JMS provider. The CConnectionFactory is an abstract base class.

Inheritance Hierarchy

None

Subclasses

  • CFioranoConnectionFactory
  • CQueueConnectionFactory
  • CTopicConnectionFactory

Methods

virtual CConnection *createConnection() throw (CJMSException *) = 0;

Creates a connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start() method is explicitly called.

Parameters: None

Returns: CConnection object

Exceptions: CJMSException

 

virtual CConnection *createConnection(mqcstring username, mqcstring password)throw (CJMSException *) = 0;

Creates a connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called. If NULL values are passed as parameters, then it considers the default identity.

Parameters:

  • username – The caller’s user name
  • password – The caller’s password

Returns: CConnection object

Exceptions: CJMSException

CFioranoConnectionFactory

A client uses a CFioranoConnectionFactory object to create unified Connection objects to use with PTP and PubSub messaging models.

Inheritance Hierarchy

Subclasses

None

Constructors

CFioranoConnectionFactory();

Parameters: None

 

CFioranoConnectionFactory(CHashTable *env, mqstring connectionFactoryName)throw (CJMSException *);

Creates a ConnectionFactory with the specified name and specified environment variables
without using JNDI lookup.

Parameters:

  • env - CHashTable contains the specified environment variables.
  • connectionFactoryName - Name of the ConnectionFactory

Exceptions: CJMSException

Methods

CConnection *createConnection()     throw (CJMSException *);   

Creates a unified connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start() method is explicitly called.

Parameters: None

Returns: CConnection object

Exceptions: CJMSException

 

CConnection *createConnection(mqcstring username, mqcstring password) throw(CJMSException *);

Creates a unified connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start() method is explicitly called.

Parameters:

  • username – The caller’s user name
  • password – The caller’s password

Returns: CConnection object

Exceptions: CJMSException

 

AdminObjectType getLookupObjectType() FMQCONST throw (CJMSException *);

This function returns the type of looked up Object. The return value AdminObjectType is enum of:

  • OBJID_QCF, (QueueConnectionFactory )
  • OBJID_TCF, (TopicConnectionFactory )
  • OBJID_QUEUE, (Queue destination )
  • OBJID_TOPIC, (Topic destination )
  • OBJID_GAO, (GenericAdminObject)
  • OBJID_ACF, (AdminConnectionFactory)
  • OBJID_UCF, (UnifiedConnectionFactory)

Parameters: None

Returns: AdminObjectType

Exceptions: CJMSException

CQueueConnectionFactory

A client uses a CQueueConnectionFactory object to create CQueueConnection objects with a point-to-point JMS provider.

Inheritance Hierarchy

Subclasses

None

Constructors

CQueueConnectionFactory(CHashTable* env,mqstring qcfName)throw (CJMSException *);
           
Creates a new QueueConnectionFactory with the specified name and with the
specified properties on the hashtable, without using JNDI lookup.

Parameters:

  • env - CHashTable contains the specified environment variables.
  • qcfName - Name of the QueueConnectionFactory

Exceptions: CJMSException

Methods

CQueueConnection *createQueueConnection() throw (CJMSException *);      

Creates a queue connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters: None

Returns: CQueueConnection object

Exceptions: CJMSException

 

CQueueConnection *createQueueConnection(mqcstring username, mqcstring password) throw (CJMSException *);

Creates a queue connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters:

  • username – The caller’s user name
  • password – The caller’s password

Returns: CQueueConnection object

Exceptions: CJMSException

 

AdminObjectType getLookupObjectType() FMQCONST throw (CJMSException *);

This function will returns the type of looked up Object. The return value AdminObjectType is enum of:

  • OBJID_QCF, (QueueConnectionFactory )
  • OBJID_TCF, (TopicConnectionFactory )
  • OBJID_QUEUE, (Queue destination )
  • OBJID_TOPIC, (Topic destination )
  • OBJID_GAO, (GenericAdminObject)
  • OBJID_ACF, (AdminConnectionFactory)
  • OBJID_UCF, (UnifiedConnectionFactory)

Parameters: None

Returns: AdminObjectType

Exceptions: CJMSException

Inherited Methods

CreateConnection, getLookupObjectType

CTopicConnectionFactory

A client uses a CTopicConnectionFactory object to create CTopicConnection objects with a PubSub JMS provider.

Inheritance Hierarchy

Subclasses

None

Constructors

CTopicConnectionFactory(CHashTable *env,mqstring tcfName)throw (CJMSException *);

Creates a new TopicConnectionFactory with the specified name and with the specified properties on the hashtable, without using JNDI lookup.

               Parameters:

  • env - CHashTable contains the specified environment variables.
  • tcfName - Name of the TopicConnectionFactory

             Exceptions: CJMSException

Methods

CTopicConnection *createTopicConnection() throw (CJMSException *);     

Creates a topic connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start() or simple start() method is explicitly called.

Parameters: None

Returns: CTopicConnection object

Exceptions: CJMSException

 

CTopicConnection *createTopicConnection(mqcstring username, mqcstring password) throw (CJMSException *);

Creates a topic connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters:

  • username – The caller’s user name
  • password – The caller’s password

Returns: CTopicConnection object

Exceptions: CJMSException

 

AdminObjectType getLookupObjectType() FMQCONST throw (CJMSException *);

This function will returns the type of looked up Object. The return value AdminObjectType is enum of:

  • OBJID_QCF, (QueueConnectionFactory )
  • OBJID_TCF, (TopicConnectionFactory )
  • OBJID_QUEUE,             (Queue destination )
  • OBJID_TOPIC,   (Topic destination )
  • OBJID_GAO, (GenericAdminObject)
  • OBJID_ACF, (AdminConnectionFactory)
  • OBJID_UCF, (UnifiedConnectionFactory)

Parameters: None

Returns: AdminObjectType

Exceptions: CJMSException

Inherited Methods

CreateConnection, getLookupObjectType

CAdminConnection

AdminConnectionFactories are used to create AdminConnections with the FioranoMQ Server. The AdminConnection is created with the server running on the ConnectURL specified in the AdminConnectionFactory and if the same is unavailable then the RTL tries to make a connection with a BackupURL, if any. AdminConnections can be created using default user identity ("admin","passwd" in case of FioranoMQ) or by specifying a username and password.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CAdminConnection()
         The default constructor.

Methods

CMQAdminService* getMQAdminService() FMQCONST throw (CJMSException*)

A MQAdminService object provides methods for creating and deleting Queues, Topics,QueueConnectionFactory and TopicConnectionFactory objects. Various get/set methods specify the object properties to and from the server.

Returns: A newly created admin connection.

Parameters: None

Exceptions: CJMSException

 

void close() throw (CJMSException*)

Closes the connection.

Returns: Void

Parameters: None

Exceptions: CJMSException

 

void setAdvisoryMessageListener(const CAdvisoryMsgListener *advMsgListener) throw (CJMSException *);

Sets the Advisory Message listener to the connection. The user application should implement the ‘onAdvisoryMessage’ method to receive any state change event that happens on this connection. For more information refer to section on Advisory Message listeners in C++.

Parameters: advMsgListener – the CAdvisoryMsgListener

Returns: Void

Exceptions: CJMSException

CConnection

A Connection object is a client's active connection to its JMS provider.

Inheritance Hierarchy

None

Subclasses

  • CFioranoConnection
  • CQueueConnection
  • CTopicConnection

Methods

virtual void close() throw (CJMSException *) = 0;

Closes the connection. If an application tries to close a connection that is already closed, the call is ignored. Closing a connection causes all temporary destinations to be deleted.

Parameters: None

Returns: Void

Exceptions: CJMSException.                

 

virtual CJMSSession *createSession(const mqboolean transacted, const mqint acknowledgeMode)?throw (CJMSException *) = 0;

Creates a CJMSSession object.

Parameters:

  • transacted – Indicates whether the session is transacted.
  • acknowledgeMode: indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE.

Returns: CJMSSession object

Exceptions: CJMSException.

 

virtual mqcstring getClientID() FMQCONST throw (CJMSException *) = 0;

Gets the client identifier for this connection. This value is specific to the JMS provider. It is either preconfigured by an administrator in a ConnectionFactory object or assigned dynamically by the application by calling the setClientID method.

Parameters: None

Returns: The client id of this connection.

Exceptions: CJMSException.

 

virtual CExceptionListener *getExceptionListener() FMQCONST throw (CJMSException *) = 0;

Get a pointer to the exception listener that is registered with the connection.

Parameters: None

Returns: Pointer to the exception listener.

Exceptions: CJMSException.

 

virtual void setExceptionListener(const CExceptionListener * exceptionListener) throw (CJMSException *) = 0;

Sets an exception listener for this connection. If a JMS provider detects a serious problem with a connection, it informs the connection's ExceptionListener, if one has been registered. It does this by calling the listener's onException method, passing it a JMSException object describing the problem.

An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn their connection has failed.

Parameters:

  • exceptionListener: A pointer to the exception listener. If an exception listener is already registered with the connection, you can cancel the registration by specifying a null pointer instead.

Returns: Void

Exceptions: CJMSException

 

virtual void setClientID(mqcstring clientID) throw (CJMSException *) = 0;

Set a client identifier for the connection. If an application calls this method to set a client identifier for a connection, the application must do so immediately after creating the connection, and before performing any other operation on the connection.

Parameters: clientID: The unique client identifier.Returns: Void

Exceptions: CJMSException

 

virtual void start() FMQCONST throw (CJMSException *) = 0;

Starts (or restarts) a connection's delivery of incoming messages. A call to start on a connection that has already been started is ignored.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

virtual void stop() FMQCONST      throw (CJMSException *) = 0;

Temporarily stops a connection's delivery of incoming messages. Delivery can be restarted using the connection's start method. When the connection is stopped, delivery to all the connection's message consumers is inhibited: synchronous receives block, and messages are not delivered to message listeners. Stopping a connection has no effect on its ability to send messages. A call to stop on a connection that has already been stopped is ignored.

Parameters: None

Returns: Void

Exceptions: CJMSException

CFioranoConnection

CFioranoConnection represents the Unified messaging model, where it can be used for both Point-to-Point and Pub/Sub messaging domains. Each CFioranoConnection creates a CQueueConnection and CTopicConnection based on the destination type used for sending/Receiving messages.

Inheritance Hierarchy

Subclasses

None

Constructors

CFioranoConnection() throw (CJMSException *); 

             Creates defualt Fiorano Unified Connection.

 

Methods

mqcstring getUnifiedConnectionID() FMQCONST throw (CJMSException *);

Gets the CFioranoConnection’s unique connection ID.

Parameters: None

Returns: The connection id as const char*.

Exceptions: CJMSException

 

void setUnifiedConnectionID(mqcstring ucId) throw (CJMSException *);

Sets connection id for Unified connection. The unified connection id is different from Queue Connection id or topic connection id. Each Queue/Topic connection ids in a unified connection will have a common unified connection id.

Parameters: ucId – connection id as const char*.

Returns: void

Exceptions: CJMSException

 

CJMSSession *createQueueSession(const mqboolean isTransacted, const mqint ackMode)throw (CJMSException *);

Creates Queue Session.

Parameters:

  • isTransacted – If the session has to be transacted or not.
  • ackMode: indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE.

Returns: CJMSSession

Exceptions: CJMSException

 

CJMSSession *createTopicSession(const mqboolean isTransacted, const mqint ackMode) throw (CJMSException *);

Creates Topic session.

Parameters:

  • isTransacted – If the session has to be transacted or not.
  • ackMode: indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE.

Returns: CJMSSession

Exceptions: CJMSException

void setAdvisoryMessageListener(const CAdvisoryMsgListener *advMsgListener) throw (CJMSException *);

Sets the Advisory Message listener to the unified connection. The user application should implement
the “onAdvisoryMessage” method to receive any state change event that happens on this
connection. For more information refer to section on Advisory Message listeners in C++.

Parameters: advMsgListener: the CAdvisoryMsgListener

Returns: Void

Exceptions: CJMSException

void setExceptionListener(const CExceptionListener *exceptionListener)throw (CJMSException *);

Sets an exception listener for this unified connection. If a JMS provider detects a serious problem with
a connection, it informs the connection's ExceptionListener, if one has been registered. It does
this by calling the listener's onException method, passing it a JMSException object describing
the problem. An exception listener allows a client to be notified of a problem asynchronously. Some
connections only consume messages, so they would have no other way to learn their
connection has failed.

Parameters:

exceptionListener: A pointer to the exception listener. If an exception listener is     already registered with the connection, you can cancel the registration by specifying a null pointer instead.

Returns: Void

Exceptions: CJMSException

CQueueConnection

A CQueueConnection object is an active connection to a point-to-point JMS provider. A client uses a CQueueConnection object to create one or more CQueueSession objects for producing and consuming messages.

Inheritance Hierarchy

Subclasses

None

Methods

CQueueSession *createQueueSession(mqboolean transacted, mqint acknowledgeMode)   throw (CJMSException *);

CJMSSession *createSession(const mqboolean transacted, const mqint acknowledgeMode)throw (CJMSException *);

Creates a Queue Session Object.

Parameters:

  • transacted – If the session has to be transacted or not.
  • acknowledgeMode: indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE.

Returns: CQueueSession

Exceptions: CJMSException

 

void setAdvisoryMessageListener(const CAdvisoryMsgListener *advMsgListener) throw (CJMSException *);

Sets the Advisory Message listener to the connection. The user application should implement the ‘onAdvisoryMessage’ method to receive any state change event that happens on this connection. For more information refer to section on Advisory Message listeners in C++.

Parameters: advMsgListener: the CAdvisoryMsgListener

Returns: Void

Exceptions: CJMSException

CTopicConnection

A CTopicConnection object is an active connection to a publish/subscribe JMS provider. A client uses a CTopicConnection object to create one or more CTopicSession objects for producing and consuming messages.

Inheritance Hierarchy

Subclasses

None

Methods

CTopicSession *createTopicSession(mqboolean transacted,  mqint acknowledgeMode) throw (CJMSException *);

CJMSSession *createSession(const mqboolean transacted, const mqint acknowledgeMode)throw (CJMSException *);

Creates a Topic Session Object.

Parameters:

  • transacted – If the session has to be transacted or not.
  • acknowledgeMode: indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE.

Returns: CTopicSession

Exceptions: CJMSException

 

void setAdvisoryMessageListener(const CAdvisoryMsgListener *advMsgListener)   throw (CJMSException *);

Sets the Advisory Message listener to the connection. The user application should implement the ‘onAdvisoryMessage’ method to receive any state change event that happens on this connection. For more information refer to section on Advisory Message listeners in C++.

Parameters: advMsgListener – the CAdvisoryMsgListener

Returns: Void

Exceptions: CJMSException

CJMSSession

CJMSSession is an abstract base class. A CJMSSession object is a single-threaded context for producing and consuming messages. It is considered a lightweight JMS object.

Inheritance Hierarchy

None

Subclasses

  • CTopicSession
  • CQueueSession
  • CFioranoSession

Methods

virtual void close()throw (CJMSException *) = 0;

Closes the session. If the session is transacted, any transaction in progress is rolled back. This call will block until a receive call or message listener in progress has completed. A blocked message consumer’s receive call returns NULL when this session is closed.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

virtual void commit() throw (CJMSException *) = 0;

Commit all messages in the current transaction only if the session is set as transacted.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

virtual CQueueBrowser *createBrowser(const CQueue *q) FMQCONST throw (CJMSException *) = 0;

Creates a CQueueBrowser object to look at the messages on the specified queue.

Parameters: CQueue object to access.

Returns: The CQueueBrowser object.

Exceptions: CJMSException

 

virtual CQueueBrowser *createBrowser(const CQueue *queue, mqcstring messageSelector) FMQCONST throw (CJMSException *) = 0;

Creates a QueueBrowser object to look at the messages on the specified queue using a message selector.

Parameters:

  • Queue: CQueue object to access.
  • messageSelector: only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.

Returns: The CQueueBrowser object.

Exceptions: CJMSException

 

virtual CTopicSubscriber *createDurableSubscriber(const CTopic *topic,     mqcstring name) FMQCONST throw (CJMSException *) = 0;

Creates a durable subscriber to the specified topic. If a client needs to receive all the messages published on a topic, including the ones published while the subscriber is inactive, it uses a durable TopicSubscriber. The JMS provider retains a record of this durable subscription and ensures that all messages from the topic's publishers are retained until they are acknowledged by this durable subscriber or they have expired.

Sessions with durable subscribers must always provide the same client identifier. Additionally, each client must specify a name that uniquely identifies (within client identifier) each durable subscription it creates. Only one session at a time can have a TopicSubscriber for a particular durable subscription.

A client can change an existing durable subscription by creating a durable TopicSubscriber with the same name, a new topic and/or message selector. Changing a durable subscriber is equivalent to unsubscribing (deleting) the old one and creating a new one.

Parameters:

  • topic: the non-temporary Topic to subscribe to
  • name: the name used to identify this subscription

Returns: The TopicSubscriber Object.

Exceptions: CJMSException.

 

virtual CTopicSubscriber *createDurableSubscriber(const CTopic *topic, mqcstring name, mqcstring messageSelector, mqboolean noLocal) FMQCONST throw (CJMSException *) = 0;

Creates a durable subscriber to the specified topic, using a message selector and specifying whether messages published by its own connection should be delivered to it.

Parameters:

  • topic: the non-temporary Topic to subscribe to
  • name: the name used to identify this subscription
  • messageSelector: only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
  • noLocal: if set, inhibits the delivery of messages published by its own connection

Returns: The TopicSubscriber Object.

Exceptions: CJMSException.

 

virtual CMapMessage *createMapMessage() FMQCONST throw (CJMSException *) = 0;

Creates a Map Message.

Parameters: None

Returns: The CMapMessage Object.

Exceptions: CJMSException.

 

virtual CMessage *createMessage()FMQCONST throw (CJMSException *) = 0;

Creates a message that has no body.

Parameters: None

Returns: The CMessage Object.

Exceptions: CJMSException.

 

virtual CObjectMessage *createObjectMessage() FMQCONST throw (CJMSException *) = 0;

Creates an Object Message.

Parameters: None

Returns: The CObjectMessage Object.

Exceptions: CJMSException.

 

virtual CQueue *createQueue(mqcstring queueName) FMQCONST              throw (CJMSException *) = 0;

Creates a Queue destination in the messaging server with the specified queueName as mqctsring.

Parameters: queueName – name of the queue on the MQ Server.Returns: The CQueue Object.

Exceptions: CJMSException.

 

virtual CStreamMessage *createStreamMessage() FMQCONST throw (CJMSException *) = 0;

Creates a CStreamMessage.

Parameters: None

Returns: The CStreamMessage Object.

Exceptions: CJMSException.

 

virtual CTemporaryQueue *createTemporaryQueue() FMQCONST                throw (CJMSException *) = 0;

Creates a TemporaryQueue object. Its lifetime will be that of the Connection unless it is deleted earlier.

Parameters: None

Returns: The CTemporaryQueue Object.

Exceptions: CJMSException.

 

virtual CTemporaryTopic *createTemporaryTopic() FMQCONST      throw (CJMSException *) = 0;

Creates a TemporaryTopic object. Its lifetime will be that of the Connection unless it is deleted earlier.

Parameters: None

Returns: The CTemporaryTopic Object.

Exceptions: CJMSException.

 

virtual CTextMessage *createTextMessage() FMQCONST throw (CJMSException *) = 0;

Creates a TextMessage with empty body.

Parameters: None

Returns: The CTextMessage Object.

Exceptions: CJMSException.

 

virtual CTextMessage *createTextMessage(mqcstring text) FMQCONST     throw (CJMSException *) = 0;

Creates a TextMessage initialised with text provided.

Parameters: text:  message in the form of const char*

Returns: The CTextMessage Object.

Exceptions: CJMSException.

 

virtual CTopic *createTopic(mqcstring topicName) FMQCONST       throw (CJMSException *) = 0;

Creates a Topic destination in the messaging server.

Parameters: topicName: name of the Topic in the form of const char*

Returns: The CTopic Object.

Exceptions: CJMSException.

 

virtual CMessageListener *getMessageListener() FMQCONST         throw (CJMSException *) = 0;

Returns the session's distinguished message listener.

Parameters: None

Returns: The CMessageListener Object.

Exceptions: CJMSException.

 

virtual mqboolean getTransacted() FMQCONST throw (CJMSException *) = 0;

Indicates whether the session is transacted or not.

Parameters: None

Returns:

  • 1 – Transacted
  • 0: Non-Transacted.

Exceptions: CJMSException.

 

virtual void recover()throw (CJMSException *) = 0;

Stops message delivery in this session and restarts message delivery with the oldest unacknowledged message.

All consumers deliver messages in a serial order. Acknowledging a received message automatically acknowledges all messages that have been delivered to the client. This session must be a Non-Transacted one.

Restarting a session causes it to take the following actions:

  • Stop message delivery
  • Mark all messages that might have been delivered but not acknowledged as "redelivered"
  • Restart the delivery sequence including all unacknowledged messages that had been previously delivered. Redelivered messages do not have to be delivered in exactly their original delivery order.

Parameters: None

Returns: Void

Exceptions: CJMSException.

 

virtual void rollback() throw (CJMSException *) = 0;

Rolls back any messages done in this transaction. The Session must be Transacted.

Parameters: None

Returns: Void

Exceptions: CJMSException.

 

virtual void setMessageListener(const CMessageListener *messageListener)throw (CJMSException *) = 0;

Sets the session's distinguished message listener.

Parameters: messageListener

Returns: Void

Exceptions: CJMSException.

 

virtual void unsubscribe(mqcstring name) throw (CJMSException *) = 0;

Unsubscribes a durable subscription that has been created by a client. This method deletes the state being maintained on behalf of the subscriber by its provider. It is erroneous for a client to delete a durable subscription while there is an active MessageConsumer or TopicSubscriber for the subscription, or while a consumed message is part of a pending transaction or has not been acknowledged in the session. 

Note: It is recommended to unsubscribe the subscription after closing the Subscriber.

Parameters: name – Subscription name used to identify the durable subscriber.

Returns: Void

Exceptions: CJMSException.

CFioranoSession

The CFioranoSession class provides a unified Session object and provides methods to create producers and consumers.

Methods


CFioranoMessageConsumer *createConsumer(const CDestination *dest) FMQCONST throw (CJMSException *);

Creates a CFioranoMessageConsumer for the specified destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a CFioranoMessageConsumer.

Parameters: dest – destination to consume messages

Returns: CFioranoMessageConsumer

Exceptions: CJMSException.

 

CFioranoMessageConsumer *createConsumer(const CDestination *dest, mqcstring messageSelector, mqboolean noLocal) FMQCONST                                  throw (CJMSException *);

Creates MessageConsumer for the specified destination, using a message selector. This method can specify whether messages published by its own connection should be delivered to it, if the destination is a topic.

Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a MessageConsumer. A client uses a MessageConsumer object to receive messages that have been published to a destination. In some cases, a connection may both publish and subscribe to a topic. The consumer NoLocal attribute allows a consumer to inhibit the delivery of messages published by its own connection. The default value for this attribute is False. The noLocal value must be supported by destinations that are topics.

Parameters:

  • dest – destination to consume messages
  • messageSelector: only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.
  • NoLocal: if true, and the destination is a topic, inhibits the delivery of messages published by its own connection. The behavior for NoLocal is not specified if the destination is a queue.

Returns: CFioranoMessageConsumer

Exceptions: CJMSException.

 

CFioranoMessageProducer *createProducer(const CDestination *dest) FMQCONST throw (CJMSException *);

Creates a MessageProducer to send messages to the specified destination. A client uses a CFioranoMessageProducer object to send messages to a destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a CFioranoMessageProducer object.

Parameters: dest – destination to publish messages

Returns: CFioranoMessageProducer

Exceptions: CJMSException.

CQueueSession

The CQueueSession class provides methods for creating CQueueReceiver, CQueueSender, CQueueBrowser, and CTemporaryQueue objects.

Methods


CQueueReceiver *createReceiver(const CQueue *queue) FMQCONST throw (CJMSException *);

Creates a CQueueReceiver object to receive messages from the specified queue.

Parameters: queue – Queue destination to access.

Returns: CQueueReceiver object

Exceptions: CJMSException.

 

CQueueReceiver *createReceiver(const CQueue *queue, mqcstring messageSelector) FMQCONST throw (CJMSException *);

Creates a CQueueReceiver object to receive messages from the specified queue using a message selector.

Parameters:

  • queue – Queue destination to access.
  • messageSelector: only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.

Returns: CQueueReceiver object

Exceptions: CJMSException.

 

CQueueSender *createSender(const CQueue *queue) FMQCONST              throw (CJMSException *);

Creates a CQueueSender object to send messages to the specified queue.

Parameters:

  • queue – Queue destination to access, or null if this is an unidentified producer

Returns: CQueueSender object

Exceptions: CJMSException.

CTopicSession

The CTopicSession class provides methods for creating CTopicPublisher, CTopicSubscriber, and CTemporaryTopic objects. It also provides a method for deleting its client's durable subscribers.

Methods


CTopicPublisher *createPublisher(const CTopic *topic) FMQCONST throw (CJMSException *);

Creates a publisher for the specified topic. A client uses a TopicPublisher object to publish messages on a topic. Each time a client creates a TopicPublisher on a topic, it defines a new sequence of messages that have no ordering relationship with the messages it has previously sent.

Parameters:

  • topic – Topic destination to publish, or null if it is an unidentified producer

Returns: CTopicPublisher

Exceptions: CJMSException.

 

CTopicSubscriber *createSubscriber(const CTopic *topic) FMQCONST throw (CJMSException *);

Creates a nondurable subscriber to the specified topic. A client uses a TopicSubscriber object to receive messages that have been published to a topic. Regular TopicSubscriber objects are not durable. They receive only messages that are published while they are active.

In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

Parameters: topic – Topic destination to subscribe to

Returns: CTopicSubscriber

Exceptions: CJMSException.

 

CTopicSubscriber *createSubscriber(const CTopic *topic, mqcstring messageSelector,mqboolean noLocal) FMQCONST throw (CJMSException *);

Creates a nondurable subscriber to the specified topic, using a message selector or specifying whether messages published by its own connection should be delivered to it. A client uses a TopicSubscriber object to receive messages that have been published to a topic.

Regular TopicSubscriber objects are not durable. They receive only messages that are published while they are active.

Messages filtered out by a subscriber's message selector will never be delivered to the subscriber. From the subscriber's perspective, they do not exist.

In some cases, a connection may both publish and subscribe to a topic. The subscriber NoLocal attribute allows a subscriber to inhibit the delivery of messages published by its own connection. The default value for this attribute is false.

Parameters:

  • topic – Topic destination to subscribe to
  • messageSelector: only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for the message consumer.   
  • noLocal: if set, inhibits the delivery of messages published by its own connection

Returns: CTopicSubscriber

Exceptions: CJMSException.

CMessageProducer

A client uses a CMessageProducer object to send messages to a destination. A CMessageProducer object is created by passing a Destination object to a message-producer creation method supplied by a session.
A client also has the option of creating a message producer without supplying a destination. In this case, a destination must be provided with every send operation. A typical use for this kind of message producer is to send replies to requests using the request's JMSReplyTo destination.
A client can specify a default delivery mode, priority, and time to live for messages sent by a message producer. It can also specify the delivery mode, priority, and time to live for an individual message.
A client can specify a time-to-live value in milliseconds for each message it sends.

Inheritance Hierarchy

None

Subclasses

CMessageProducer is an abstract base class with the following derived classes.

  • CQueueSender
  • CTopicPublisher
  • CFioranoMessageProducer

Methods

virtual void close()throw (CJMSException *)=0;

Closes the message producer.

Parameters: None

Returns: void

Exceptions: CJMSException

 

virtual mqint getDeliveryMode() FMQCONST throw (CJMSException *)  = 0;

Gets the producer's default delivery mode.

Parameters: None

Returns: Delivery mode on this producer.  It can be one of NON_PERSISTENT (1) or PERSISTENT (2)

Exceptions: CJMSException

 

virtual CDestination *getDestination() FMQCONST throw (CJMSException *)  = 0;

Parameters: None

Returns: This producer’s destination.

Exceptions: CJMSException

 

virtual mqboolean getDisableMesageTimestamp() FMQCONST throw (CJMSException *)  = 0;

Gets an indication of whether message timestamps are disabled.

Parameters: None

Returns: An indication of whether message timestamps are disabled

Exceptions: CJMSException

 

virtual mqboolean getDisableMessageID() FMQCONST throw (CJMSException *)  = 0;

Gets an indication of whether message IDs are disabled.

Parameters: None

Returns: An indication of whether message IDs are disabled. By default this is disabled for FioranoMQ.

Exceptions: CJMSException

 

virtual mqint getPriority() FMQCONST throw (CJMSException *)  = 0;

Gets the producer's default priority.

Parameters: None

Returns: The message priority for this message producer 

Exceptions: CJMSException

 

virtual mqlong getTimeToLive() FMQCONST throw (CJMSException *)  = 0;

Gets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

Parameters: None

Returns: The message time to live in milliseconds; zero is unlimited

Exceptions: CJMSException

 

virtual void setDeliveryMode(mqint  deliveryMode)              throw (CJMSException *)  = 0;

Sets the producer's default delivery mode. Delivery mode is set to PERSISTENT by default.

 Parameters:

  • deliveryMode: the message delivery mode for this message producer; legal values are NON_PERSISTENT(1) and PERSISTENT(2)

Returns: Void

Exceptions: CJMSException

 

virtual void setDisableMessageID(mqboolean value)          throw (CJMSException *)  = 0;

Sets whether message IDs are disabled. Disabled for FioranoMQ by default.

Parameters: value: indicates if message IDs are disabled

Returns: Void

Exceptions: CJMSException

 

virtual void setDisableMessageTimestamp(mqboolean value)         throw (CJMSException *)  = 0;

Sets whether message timestamps are disabled.

Parameters: value: indicates if message timestamps are disabled

Returns: Void

Exceptions: CJMSException

 

virtual void setPriority(mqint defaultPriority)        throw (CJMSException *)  = 0;

Sets the producer's default priority.  Priority is set to 4 by default.

Parameters:

  • defaultPriority: the message priority for this message producer; must be a value between 0 and 9

Returns: Void

Exceptions: CJMSException

 

virtual void setTimeToLive(mqlong timeToLive) throw (CJMSException *)  = 0;

Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system. Time to live is set to zero by default.

Parameters:

  • timeToLive: the message time to live in milliseconds; zero is unlimited

Returns: Void

Exceptions: CJMSException

 

virtual void send(const CDestination *dest, CMessage *msg) FMQCONST throw (CJMSException *)  = 0;

Sends a message to a destination for an unidentified message producer. Uses the CMessageProducer's default delivery mode, priority, and time to live.

Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.

Parameters:

  • dest: the destination to send this message
  • msg: the message to send

Returns: void

Exceptions: CJMSException

 

virtual void send(const CDestination *dest, CMessage *msg, mqint deliveryMode, mqint priority, mqint timeToLive) FMQCONST throw (CJMSException *)  = 0;

Sends a message to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.

Parameters:

  • dest: the destination to send this message
  • ms: the message to send
  • deliveryMode: the delivery mode to use
  • priority: the priority for this message
  • timeToLive: the message's lifetime (in milliseconds)

Returns: void

Exceptions: CJMSException

 

virtual void send(CMessage *msg) FMQCONST throw (CJMSException *)  = 0;

Sends a message using the MessageProducer's default delivery mode, priority, and time to live.

Parameters: msg: the message to send

Returns: void

Exceptions: CJMSException

 

virtual void send(CMessage *msg,mqint deliveryMode, mqint priority, mqlong timeToLive) FMQCONST throw (CJMSException *)  = 0;

Sends a message to the destination, specifying delivery mode, priority, and time to live.

Parameters:

  • msg: the message to send
  • deliveryMode: the delivery mode to use
  • priority: the priority for this message
  • timeToLive: the message's lifetime (in milliseconds)

Returns: void

Exceptions: CJMSException

CFioranoMessageProducer

The CFioranoMessageProducer class provides a unified MessageProducer object which can be used as QueueSender or TopicPublisher.

Inheritance Hierarchy

Subclasses

None

Constructors

CFioranoMessageProducer();

Default constructor.

Parameters: None

CQueueSender

A client uses a CQueueSender object to send messages to a queue. Normally, the Queue is specified when a CQueueSender is created. An exception will be thrown if an attempt is made to use the send methods for an unidentified CQueueSender.

Inheritance Hierarchy

Subclasses

None

Methods

(CQueueSender defines all the methods in CMessageProducer class, with the following additional APIs)

CQueue *getQueue() FMQCONST throw (CJMSException *);

Parameters: None

Returns: CQueue

Exceptions: CJMSException

CTopicPublisher

A client uses a CTopicPublisher object to publish messages on a topic. A CTopicPublisher object is the publish-subscribe form of a message producer. Normally, the Topic is specified when a TopicPublisher is created. An exception will be thrown if an attempt is made to use the publish methods for an unidentified CTopicPublisher.

Inheritance Hierarchy

Subclasses

None

Methods

(CTopicPublisher defines all the methods in CMessageProducer class, with the following additional APIs)

CTopic *getTopic() FMQCONST throw (CJMSException *);

Parameters: None

Returns: CTopic

Exceptions: CJMSException

CQueueRequestor

The CQueueRequestor helper class simplifies making service requests.
The CQueueRequestor constructor is given a non-transacted CQueueSession and a destination Queue. It creates a TemporaryQueue for the responses and provides a request method that sends the request message and waits for its reply.

Inheritance Hierarchy

None

Subclasses

None

Constructor

CQueueRequestor(CQueueSession *qs,CQueue *queue) throw (CJMSException *);

Constructor for the CQueueRequestor class.  This implementation assumes the session parameter to be non-transacted, with a delivery mode of either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE.

Parameters:

  • qs – The CQueueSession the queue belongs to
  • queue – The Queue to perform request/reply call on.

Exceptions: CJMSException.

Methods

void close() throw (CJMSException *);

Closes the CQueueRequestor. Note that the CQueueSession is not closed in this call.

Parameters: None

Returns: Void

Exceptions: CJMSException.

 

CMessage *request(CMessage *msg) FMQCONST throw (CJMSException *);

Sends a request and waits for a reply. The temporary queue is used for the JMSReplyTo destination, and only one reply per request is expected.

Parameters: msg – The message to send

Returns: CMessage – the reply message

Exceptions: CJMSException.

 

CMessage *request(CMessage *msg, const mqlong timeout) FMQCONST throw (CJMSException *);

Send a request and wait for a reply within the specified timeout. The temporary topic is used for replyTo; the first reply is returned  and the subsequent replies are discarded.

Parameters:

  • msg – The message to send
  • timeout: the time for which the requestor will wait for a reply

Returns: CMessage – the reply message

Exceptions: CJMSException.

CTopicRequestor

The CTopicRequestor helper class simplifies making service requests. The CTopicRequestor constructor is given a non-transacted TopicSession and a destination Topic. It creates a TemporaryTopic for the responses and provides a request method that sends the request message and waits for its reply.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CTopicRequestor(CTopicSession *ts,CTopic *topic) throw (CJMSException *);

Constructor for the TopicRequestor class.  This implementation assumes the session parameter to be non-transacted, with a delivery mode of either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE.

Parameters:

  • Ts: The CTopicSession the topic belongs to
  • Topic: The Topic destination to perform request/reply call on.

Exceptions: CJMSException.

Methods

void close() throw (CJMSException *);

Closes the CTopicRequestor. Note that the CTopicSession is not closed in this call.

Parameters: None

Returns: Void

Exceptions: CJMSException.

 

CMessage *request(CMessage *msg) FMQCONST  throw (CJMSException *);

Sends a request and waits for a reply. The temporary queue is used for the JMSReplyTo destination, and only one reply per request is expected.

Parameters: msg: The message to send

Returns: CMessage: the reply message

Exceptions: CJMSException.

 

CMessage *request(CMessage *msg, const mqlong timeout) FMQCONST  throw (CJMSException *);

Send a request and wait for a reply within the specified timeout. The temporary topic is used for replyTo; the first reply is returned  and the subsequent replies are discarded.

Parameters:

  • Msg: The message to send
  • Timeout: the time for which the requestor will wait for a reply

Returns: CMessage: the reply message

Exceptions: CJMSException.

CMessageConsumer

A client uses a CMessageConsumer object to receive messages from a destination. A CMessageConsumer object is created by passing a Destination object to a message-consumer creation method supplied by a session.

Inheritance Hierarchy

None

Subclasses

  • CTopicSubscriber
  • CQueueReceiver
  • CFioranoMessageConsumer

Methods

virtual void close() throw (CJMSException *) = 0;

Closes the message consumer. This call blocks until a receive or message listener in progress has completed. A blocked message consumer receive call returns null when this message consumer is closed.

Parameters: None

Returns: None

Exceptions: CJMSException     

 

virtual CMessageListener *getMessageListener() FMQCONST throw (CJMSException *) = 0;

Gets the message consumer's MessageListener.

Parameters: None

Returns: The listener for the consumer

Exceptions: CJMSException     

 

virtual mqcstring getMessageSelector() FMQCONST throw (CJMSException *) = 0;

Gets this message consumer's message selector expression.

Parameters: None

Returns: Message consumer's message selector, or null if no message selector exists for the message consumer (that is, if the message selector was not set or was set to null or the empty string)

Exceptions: CJMSException

 

virtual void setMessageListener(const CMessageListener  *messageListener) throw (CJMSException *) = 0;

Sets the message consumer's MessageListener. Setting the message listener to null is the equivalent of unsetting the message listener for the message consumer.

The effect of calling MessageConsumer.setMessageListener while messages are being consumed by an existing listener or the consumer is being used to consume messages synchronously is undefined.

Parameters:

  • messageListener: the listener to which the messages are to be delivered

Returns: Void

Exceptions: CJMSException

 

virtual CMessage *receive() FMQCONST throw (CJMSException *) = 0;

Receives the next message produced for this message consumer. This call blocks indefinitely until a message is produced or until this message consumer is closed.

Parameters: None

Returns: The next message produced for this message consumer, or null if this message consumer is concurrently closed

Exceptions: CJMSException

 

virtual CMessage *receive(mqlong timeout) FMQCONST throw (CJMSException *) = 0;

Receives the next message that arrives within the specified timeout interval.  This call blocks until a message arrives, the timeout expires, or this message consumer is closed. A timeout of zero never expires, and the call blocks indefinitely.

Parameters: timeout: the timeout value (in milliseconds)

Returns: The next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed

Exceptions: CJMSException

 

virtual CMessage *receiveNoWait() FMQCONST   throw (CJMSException *) = 0;

Receives the next message if one is immediately available.

Parameters: None

Returns: The next message produced for this message consumer, or null if one is not available.

Exceptions: CJMSException

CFioranoMessageConsumer

A client uses a CFioranoMessageConsumer (unified message consumer) object to receive messages that have been published to a topic/queue. A CFioranoMessageConsumer object is the publish/subscribe form of a message consumer.

Inheritance Hierarchy

Subclasses

None

Methods

(CFioranoMessageConsumer defines all the methods in CMessageConsumer class.)

CQueueReceiver

A client uses a QueueReceiver object to receive messages that have been delivered to a queue.

Inheritance Hierarchy

Subclasses

None

Methods

(CQueueReceiver defines all the methods in CMessageConsumer class, with the following additional APIs)

CQueue *getQueue() throw (CJMSException *);

Gets the Queue associated with this queue receiver.   

Parameters: None

Returns: The CQueue object to which this receiver is associated with.

Exceptions: CJMSException

CTopicSubscriber

A client uses a CTopicSubscriber object to receive messages that have been published to a topic. A CTopicSubscriber object is the publish/subscribe form of a message consumer.

Inheritance Hierarchy

Subclasses

None

Methods

(CTopicSubscriber defines all the methods in CMessageConsumer class, with the following additional APIs)

mqboolean getNoLocal() FMQCONST        throw (CJMSException *);

Gets the NoLocal attribute for this subscriber. The default value for this attribute is false.      

Parameters: None

Returns: true if locally published messages are being inhibited

Exceptions: CJMSException

 

CTopic *getTopic() throw (CJMSException *);

Gets the Topic associated with this subscriber.           

Parameters: None

Returns: The CTopic object to which this subscriber is associated with.

Exceptions: CJMSException

CTopicMetaData

CTopicMetaData class represents the metadata information for a Topic destination as it is stored in the JNDI store. CTopicMetaData is used for creating Topics.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CTopicMetaData()throw (CJMSException *);

Creates the CTopicMetaData object.

Parameters: None

Methods

mqboolean enableCompression(const mqint compressLevel, const mqint compressStrategy) throw (CJMSException *);

Enables Message Compression for a given message with specified compression level and compression strategy.

Parameters:

  • m_nCompressionStrategy - Compression Strategy to be set

Returns: mqboolean

Exceptions: CJMSException

TopicMetaData getTopicMetaData() FMQCONST;

Parameters: None

Returns: C runtime TopicMetaData structure.

Exceptions: None

 

mqboolean setName(mqcstring metaDataName) throw (CJMSException *);

Sets name of the topic in the Topic’s metadata.        

Parameters: metaDataName – Topic‘s name

Returns:

Exceptions: CJMSException

 

mqcstring getName() FMQCONST      throw (CJMSException *);

Parameters: None

Returns: Topic’s name.

Exceptions: CJMSException

 

void setDescription(mqcstring metaDataDescription)         throw (CJMSException *);

Sets description name for the topic.

Parameters: metaDataDescription – Description for the Topic.

Returns: None

Exceptions: CJMSException

 

mqcstring getDescription() FMQCONST  throw (CJMSException *);

Parameters: None

Returns: Description name for the Topic.

Exceptions: CJMSException

CQueueMetaData

CQueueMetaData class represents the metadata information for a Queue destination as it is stored in the JNDI store. CQueueMetaData is used for creating Queues.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CQueueMetaData()throw (CJMSException *);

Creates the CQueueMetaData object.

Parameters: None

Methods

mqboolean enableCompression(const mqint compressLevel, const mqint compressStrategy) throw (CJMSException *);

Enables Message Compression for a given message with specified compression level and compression strategy.

Parameters:

  • m_nCompressionStrategy - Compression Strategy to be set

Returns: mqboolean

Exceptions: CJMSException

QueueMetaData getQueueMetaData() FMQCONST;

Parameters: None

Returns: C runtime QueueMetaData structure.

Exceptions: None

 

mqboolean setName(mqcstring metaDataName) throw (CJMSException *);

Sets name of the queue in the Queue’s metadata.    

Parameters: metaDataName – Queue‘s name

Returns:

Exceptions: CJMSException

 

mqcstring getName() FMQCONST      throw (CJMSException *);

Parameters: None

Returns: Queue’s name.

Exceptions: CJMSException

 

void setDescription(mqcstring metaDataDescription)         throw (CJMSException *);

Sets description name for the queue.

Parameters: metaDataDescription – Description for the Queue.

Returns: None

Exceptions: CJMSException

 

mqcstring getDescription() FMQCONST throw (CJMSException *);

Parameters: None

Returns: Description name for the Queue.

Exceptions: CJMSException

CDestination

A CDestination object encapsulates a provider-specific address.

Inheritance Hierarchy

None

Subclasses

Base class for:

  • CTopic
  • CQueue

Methods

 

mqboolean isQueue() FMQCONST      throw (CJMSException *)

Checks whether the destination object is a queue or not.

Parameters: None

Returns: mqboolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean isTopic() FMQCONST throw (CJMSException *)

Checks whether the destination object is a topic or not.

Parameters: None

Returns: mqboolean value for success or failure from the server.

Exceptions: CJMSException

CQueue

A CQueue object encapsulates a provider-specific queue name. It is the way a client specifies the identity of a queue to JMS API methods. For those methods that use a CDestination as a parameter, a CQueue object is used as an argument.

Inheritance Hierarchy

Subclasses

Base class for:

  • CTemporaryQueue

Constructors

 

CQueue(mqstring queueName) throw (CJMSException *);

Creates a new Queue with the specified name without using JNDI lookup.

            Parameters:

  • queueName - Name of the Queue to be created

           Exceptions: CJMSException

Methods

mqcstring getQueueName() FMQCONST  throw (CJMSException *)

Gets the name of this queue. Clients that depend upon the name are not portable.

Parameters: None

Returns: The queue name

Exceptions: CJMSException

 

mqcstring toString() FMQCONST        throw (CJMSException *)

Returns a mqcstring representation of this object.

Parameters: None

Returns: The provider-specific identity values for this queue.

Exceptions: CJMSException

(CQueue defines getLookupObjectType() method of CLookupHelper base class)

CTopic

A CTopic object encapsulates a provider-specific topic name. It is the way a client specifies the identity of a topic to JMS API methods. For those methods that use a CDestination as a parameter, a CTopic object may used as an argument.

Inheritance Hierarchy

Subclasses

Base class for:

  • CTemporaryTopic

Constructors

 CTopic(mqstring topicName) throw (CJMSException *);

Creates a new Topic with the specified name without using JNDI lookup.

Parameters: topicName - Name of the Topic to be created

Exceptions: CJMSException

Methods

mqcstring getTopicName() FMQCONST  throw (CJMSException *)

Gets the name of this topic. Clients that depend upon the name are not portable.

Parameters: None

Returns: The topic name

Exceptions: CJMSException

 

mqcstring toString() FMQCONST throw (CJMSException *)

Returns a mqcstring representation of this object.

Parameters: None

Returns: The provider-specific identity values for this topic.

Exceptions: CJMSException

(CTopic defines getLookupObjectType() method of CLookupHelper base class)

CTemporaryQueue

A CTemporaryQueue object is a unique CQueue object created for the duration of a CConnection. It is a system-defined queue that can be consumed only by the CConnection that created it.

Inheritance Hierarchy

Subclasses

None

void remove() throw (CJMSException *);

Deletes this temporary queue. If there are existing receivers still using it, a CJMSException will be thrown.

Parameters: None

Returns: void

Exceptions: CJMSException

Methods


void remove() throw (CJMSException *);
Deletes this temporary queue. If there are existing receivers still using it, a CJMSException will be thrown.
Parameters: None
Returns: void
Exceptions: CJMSException

CTemporaryTopic

A CTemporaryTopic object is a unique CTopic object created for the duration of a CConnection. It is a system-defined topic that can be consumed only by the CConnection that created it.

Inheritance Hierarchy

Subclasses

None

Methods

void remove() throw (CJMSException *);

Deletes this temporary topic. If there are existing subscribers still using it, a CJMSException will be thrown.

Parameters: None

Returns: void

Exceptions: CJMSException

CProperty

The CProperty class wraps the 'value' part of a message property, which includes the value type, size, and the value itself.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CProperty(struct _Property* m_property)

Parameters:

  • m_property – Property structure defined in C runtime.

Methods

PropertyIndex getPropertyType() FMQCONST throw (CJMSException*)

Gets the type of the property.

Parameters: None

Returns: It returns an enum PropertyIndex. PropertyIndex is an enum of Byte, Short, Int, Float, Double, Long, ByteArray, String, Bool, Char, NullObj, Invalid, AnySerializable indices.PropertyIndex enum is defined in basic_datatypes.h file in $FMQ_DIR/clients/c/native/include directory.

Exceptions: CJMSException

 

mqbyteArray getPropertyValue() FMQCONST throw (CJMSException*)

Gets the value of the property. Despite the type of property being set, this function returns the value as a mqbyteArray (ie. char*) type.

Parameters: None

Returns:  Property value in byteArray

Exceptions: CJMSException

 

mqint getPropertySize() FMQCONST throw (CJMSException*)

Gets the size of the value as number of bytes.

Parameters: None

Returns: Property size

Exceptions: CJMSException 

mqint getPropertySize() FMQCONST throw (CJMSException*)
Gets the size of the value as number of bytes.
Parameters: None
Returns: Property size
Exceptions: CJMSException

CMessage

The CMessage interface is the base class of all JMS messages. It defines the message header and the acknowledge method used for all messages.

Inheritance Hierarchy

Subclasses

Base class for:

  • CTextMessage
  • CBytesMessage
  • CMapMessage
  • CStreamMessage
  • CObjectMessage

Methods

mqcstring getActualDestination() FMQCONST throw (CJMSException *);

Gets the actual destination name of the message.This method is used to return destination name for which the message was intended to before its arrival on SYSTEM_DMQ due to TTL expiration.

Parameters: None

Returns: ActualDestion of the message

Exceptions: CJMSException

 

mqint getCompressionLevel (mqint *val) FMQCONST throw (CJMSException *);

Returns the Compression Level set on a given message.

Parameters: val - Pointer to mqint, into which the mqint property is to be read

Returns: Compression level used

Exceptions: CJMSException

 

mqint getCompressionStrategy (mqint *val) FMQCONST throw (CJMSException *);

Returns the Compression Strategy set on a given message.

Parameters: val - Pointer to mqint, into which the mqint property is to be read

Returns: Compression strategy in int.

Exceptions: CJMSException

 

 

mqfloat getCompressionRatio() FMQCONST  throw (CJMSException *);

Returns the Compression Ratio.

Parameters: None

Returns: Compression Ratio in float.

Exceptions: CJMSException

 

mqboolean setCompressionLevel(const mqint m_nCompressionLevel)      throw (CJMSException *);

Sets the specified Compression Level on a given message.

Parameters:

  • m_nCompressionLevel - Compression level to be  set

Returns:  TRUE if Compressionlevel is set properly, FALSE otherwise

Exceptions: CJMSException

 

mqboolean setCompressionStrategy(const mqint m_nCompressionStrategy) throw (CJMSException *);

Sets the specified Compression Strategy on a given message.

Parameters:

  • m_nCompressionLevel - Compression level to be  set
  • m_nCompressionStrategy - Compression Strategy to be set

Returns:  TRUE if CompressionStrategy is set properly, FALSE otherwise

Exceptions: CJMSException

 

mqboolean enableCompression() throw (CJMSException *);

Enables Message Compression for a given message

Parameters: None

Returns:  TRUE if compression is enabled, FALSE otherwise

Exceptions: CJMSException

 

mqboolean enableCompression_params(const mqint m_nCompressionLevel,const mqint m_nCompressionStrategy) throw (CJMSException *);

Enables Message Compression for a given message with specified compression level and compression strategy.

Parameters:

  • m_nCompressionStrategy - Compression Strategy to be set

Returns:  TRUE if compression is enabled, FALSE otherwise

Exceptions: CJMSException

void acknowledge()

Acknowledges all consumed messages of the session of this consumed message. All consumed JMS messages support the acknowledge method for use when a client has specified that its JMS session's consumed messages are to be explicitly acknowledged. By invoking acknowledge on a consumed message, a client acknowledges all messages consumed by the session that the message was delivered.

Calls to acknowledge are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes. A client may individually acknowledge each message as it is consumed, or it may choose to acknowledge messages as an application-defined group (which is done by calling acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.) Messages that have been received but not acknowledged may be redelivered.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

void clearBody() throw (CJMSException *)

Clears out the message body. Clearing a message's body does not clear its header values or property entries. If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

void clearProperties() throw (CJMSException *)

Clears a message's properties. The message's header fields and body are not cleared.

Parameters: None

Returns: Void

Exceptions: CJMSException

 

CProperty getProperty(mqcstring propName) FMQCONST throw (CJMSException *);

Gets the Property object from the message with the specified propName.

Note : This property object should be freed by the client application as it is not freed by the RTL.

Parameters:

  • propName – Name of the property to be returned.

Returns: CProperty

Exceptions: CJMSException

 

mqboolean getBooleanProperty(mqcstring name) FMQCONST throw (CJMSException *)

Returns the value of the boolean property with the specified name.

Parameters: name: The name of the boolean property

Returns: The boolean property value for the specified name

Exceptions: CJMSException

 

mqbyte getByteProperty(mqcstring name) FMQCONST throw (CJMSException *)

Returns the value of the byte property with the specified name.

Parameters: name: The name of the byte property

Returns: The byte property value for the specified name

Exceptions: CJMSException

 

mqdouble getDoubleProperty(mqcstring name) FMQCONST throw (CJMSException *)

Returns the value of the double property with the specified name.

Parameters: name: The name of the double propertyReturns: The double property value for the specified name. If there is no property by this name, a null value is returned

Exceptions: CJMSException

 

mqfloat getFloatProperty(mqcstring name)FMQCONST throw (CJMSException *)

Returns the value of the float property with the specified name.

Parameters: name: The name of the float property

Returns: The float property value for the specified name

Exceptions: CJMSException


mqint getIntProperty(mqcstring name) FMQCONST throw (CJMSException *)

Returns the value of the int property with the specified name.

Parameters: name: The name of the int property.Returns: The int property value for the specified name

Exceptions: CJMSException

 

mqcstring getJMSCorrelationID() FMQCONST throw (CJMSException *)

Gets the correlation ID for the message. This method is used to return correlation ID values that are either provider-specific message IDs or application-specific String values.

Parameters: None

Returns: The correlation ID of a message as a String

Exceptions: CJMSException

 

mqcstring getJMSCorrelationIDAsBytes() FMQCONST throw (CJMSException *);

Gets the correlation ID as an array of bytes for the message. The use of a byte[] value for JMSCorrelationID is non-portable.

Parameters: None

Returns: The correlation ID of a message as an array of bytes

Exceptions: CJMSException

 

mqint getJMSDeliveryMode() FMQCONST throw (CJMSException *);

Gets the DeliveryMode value specified for this message.

Parameters: None

Returns: The delivery mode for this message

Exceptions: CJMSException

 

CDestination *getJMSDestination() FMQCONST throw (CJMSException *)

Gets the Destination object for this message. The JMSDestination header field contains the destination to which the message is being sent. When a message is sent, this field is ignored. After completion of the send or publish method, the field holds the destination specified by the method. When a message is received, its JMSDestination value must be equivalent to the value assigned when it was sent.

Parameters: None

Returns: The destination of this message

Exceptions: CJMSException

 

mqlong getJMSExpiration() FMQCONST throw (CJMSException *)

Gets the message's expiration value. When a message is sent, the JMSExpiration header field is left unassigned. After completion of the send or publish method, it holds the expiration time of the message. This is the sum of the time-to-live value specified by the client and the GMT at the time of the send or publish. If the time-to-live is specified as zero, JMSExpiration is set to zero to indicate that the message does not expire. When a message's expiration time is reached, a provider should discard it.The JMS API does not define any form of notification of message expiration. Clients should not receive messages that have expired; however, the JMS API does not guarantee that this will not happen.

Parameters: None

Returns: The time the message expires, which is the sum of the time-to-live value specified by the client and the GMT at the time of the send

Exceptions: CJMSException

 

mqcstring getJMSMessageID() FMQCONST throw (CJMSException *)

Gets the message ID. The JMSMessageID header field contains a value that uniquely identifieseach message sent by a provider. When a message is sent, JMSMessageID can be ignored. When the send or publish method returns, it contains a provider-assigned value. A JMSMessageID is a String value that should function as a unique key for identifying messages in a historical repository. The exact scope of uniqueness is provider-defined. It should at least cover all messages for a specific installation of a provider, where an installation is some connected set of message routers. All JMSMessageID values must start with the prefix 'ID:'. Uniqueness of message ID values across different providers is not required.

Since message IDs take some effort to create and increase a message's size, some JMS providers may be able to optimize message overhead if they are given a hint that the messageID is not used by an application. By calling the MessageProducer. setDisableMessageID method, a JMS client enables this potential optimization for all messages sent by that message producer. If the JMS provider accepts this hint, these messages must have the message ID set to null. If the provider ignores the hint, the messageID must be set to its normal unique value.

Parameters: None

Returns: The message ID

Exceptions: CJMSException

If the JMS provider fails to get the message ID due to some internal error.

 

mqint getJMSPriority() FMQCONST   throw (CJMSException *)

Gets the message priority level. The JMS API defines ten levels of priority value, with 0 as the lowest priority and 9 as the highest. In addition, clients should consider priorities 0-4 as gradations of normal priority and priorities 5-9 as gradations of expedited priority. The JMS API does not require that a provider strictly implement priority ordering of messages; however, it should do its best to deliver expedited messages ahead of normal messages.

Parameters: None

Returns: The default message priority

Exceptions: CJMSException

If the JMS provider fails to get the message priority due to some internal error.

 

mqboolean getJMSRedelivered() FMQCONST throw (CJMSException *)

Gets an indication of whether this message is being redelivered. If a client receives a message with the JMSRedelivered field set. It is likely, but not guaranteed, that this message was delivered earlier but that its receipt was not acknowledged at that time.

Parameters: None

Returns: TRUE if this message is being redelivered

Exceptions: CJMSException

If the JMS provider fails to get the redelivered state due to some internal error.

 

CDestination *getJMSReplyTo() FMQCONST throw (CJMSException *)

Gets the Destination object to which a reply to this message should be sent.

Parameters: None

Returns: Destination to which to send a response to this message

Exceptions: CJMSException

If the JMS provider fails to get the JMSReplyTo destination due to some internal error.

 

mqlong getJMSTimestamp() FMQCONST throw (CJMSException *)

Gets the message timestamp. The JMSTimestamp header field contains the time when the message was handed off to a provider to be sent. It is not the time when the message was actually transmitted, because the actual transmission may occur later due to transactions or other client-side queuing of messages. When a message is sent, JMSTimestamp is ignored.

Parameters: None

Returns: The timestamp of the message 

Exceptions: CJMSException

If the JMS provider fails to get the timestamp due to some internal error.

 

mqcstring getJMSType() FMQCONST        throw (CJMSException *)

Gets the message type identifier supplied by the client when the message was sent.

Parameters: None

Returns: The message type

Exceptions: CJMSException

If the JMS provider fails to get the message type due to some internal error.

 

mqlong getLongProperty(mqcstring propName) FMQCONST throw (CJMSException *)

Returns the value of the long property with the specified name.

Parameters: propName: The name of the long propertyReturns: The long property value for the specified name

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqobject getObjectProperty(mqcstring propName) FMQCONST throw (CJMSException *)

Returns the value of the object property with the specified name. This method can be used to return, in objectified format, an object that has been stored as a property in the message with the equivalent setObjectProperty method call, or its equivalent primitive settypeProperty method.

Parameters: PropName: The name of the object property

Returns: The object property value with the specified name.

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

CEnumeration *getPropertyNames() FMQCONST throw (CJMSException *)

Returns an enumeration of the property names from the message object

Parameters: None

Returns: An enumeration of the property names.

Note: The CEnumeration object contains all the property names present in the received message.The property names can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqshort getShortProperty(mqcstring propName) FMQCONST throw (CJMSException *)

Returns the value of the short property with the specified name.

Parameters: PropName: The name of the short property

Returns: The short property value for the specified name

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqcstring getStringProperty(mqcstring propName) FMQCONST throw (CJMSException *)

Returns the value of the String property with the specified name.

 

Parameters: PropName: The name of the String propertyReturns: The String property value for the specified name. If there is no property by this name, a null value is returned

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqcstring_unicode getStringProperty_unicode(mqcstring_unicode propName) FMQCONST throw (CJMSException *)

Returns the unicode string property with the specified name.

Parameters: PropName: The name of the String property in Unicode.Returns: The unicode string property value for the specified name. If there is no property by this name, a null value is returned

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqint getMessageType() FMQCONST        throw (CJMSException *)

Returns the message type property value as mqint.

Parameters: None

Returns: The mqint property value for the message type.

Exceptions: CJMSException

If the JMS provider fails to get the property value due to some internal error.

 

mqboolean propertyExists(mqcstring propName) FMQCONST throw (CJMSException *)

Indicates whether a property value exists.

Parameters: PropName: The name of the property to test

Returns: TRUE if the property exists

Exceptions: CJMSException

If the JMS provider fails to determine if the property exists due to some internal error.

 

void setBooleanProperty(mqcstring propName, const mqboolean value) throw (CJMSException *)

Sets a boolean property value with the specified name into the message.

Parameters:

  • name: The name of the boolean property
  • value: the boolean property value to set

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setByteProperty(mqcstring propName,const  mqbyte value) throw (CJMSException *)

Sets a byte property value with the specified name into the message.

Parameters:

  • name: The name of the byte property value - the byte property value to set

Returns: Void

Exceptions: CJMSException

 

void setDoubleProperty(mqcstring propName,const  mqdouble value) throw (CJMSException *)

Sets a double property value with the specified name into the message.

Parameters:

  • name: The name of the double property
  • value: The double property value to set

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setFloatProperty(mqcstring propName,const  mqfloat value) throw (CJMSException *);

Sets a float property value with the specified name into the message.

Parameters:

  • name: The name of the float property
  • value: The float property value to set

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setIntProperty(mqcstring propName,const  mqint value) throw (CJMSException *)

Sets an int property value with the specified name into the message.

Parameters:

  • propName: The name of the int property
  • Value: The int property value to set

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setJMSCorrelationID(mqcstring corrID)         throw (CJMSException *)

Sets the correlation ID for the message. A client can use the JMSCorrelationID header field to link one message with another. A typical use is to link a response message with its request message.

Parameters: correlationID: The message ID of a message being referred toReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the correlation ID due to some internal error.

 

void setJMSDeliveryMode(const mqint deliveryMode)         throw (CJMSException *)

Sets the DeliveryMode value for this message. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received.

Parameters: deliveryMode: The delivery mode for this message

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the delivery mode due to some internal error.

 

 

void setJMSDestination(const CDestination *dest) throw (CJMSException *)

Sets the Destination object for this message. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received.

Parameters: Destination: The destination for this messageReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the destination due to some internal error.

 

 void setJMSExpiration(const mqlong expiration) throw (CJMSException *)

Sets the message's expiration value. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received.

Parameters: Expiration: The message's expiration timeReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the message expiration due to some internal error.

 

void setJMSMessageID(mqcstring msgID) throw (CJMSException *)

Sets the message ID. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received.

Parameters: msgID: The ID of the messageReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the message ID due to some internal error.

 

void setJMSPriority(const mqint priority) throw (CJMSException *)

Sets the priority level for this message. JMS providers set this field whena message is sent. This method can be used to change the value for a message that has been received.

Returns: Void

Parameters: Priority: The priority of this messageExceptions: CJMSException

If the JMS provider fails to set the message priority due to some internal error.

 

void setJMSRedelivered(const mqboolean redelivered) throw (CJMSException *);

Specifies whether this message is being redelivered. This field is set at the time the message is delivered. This method can be used to change the value for a message that has been received.

Parameters:

  • Redelivered: An indication of whether this message is being redelivered

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the redelivered state due to some internal error.

 

void setJMSReplyTo(const CDestination *dest) throw (CJMSException *)

Sets the Destination object to which a reply to this message should be sent. The JMSReplyTo header field contains the destination where a reply to the current message should be sent. If it is null, no reply is expected. The destination may be either a Queue object or a Topic object. Messages sent with a null JMSReplyTo value may be a notification of some event, or they may just be some data the sender thinks is of interest. Messages with a JMSReplyTo value typically expect a response. A response is optional; it is up to the client to decide. These messages are called requests. A message sent in response to a request is called a reply. In some cases a client may wish to match a request it sent earlier with a reply it has just received. The client can use the JMSCorrelationID header field for this purpose.

Parameters: Dest: Destination to which to send a response to this messageReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the JMSReplyTo destinationdue to some internal error.

 

void setJMSTimestamp(const mqlong timestamp) throw (CJMSException *)

Sets the message timestamp. JMS providers set this field when a message is sent. This method can be used to change the value for a message that has been received.

Parameters: Timestamp: The timestamp for this message

Returns: Void

 

Exceptions: CJMSException

If the JMS provider fails to set the timestamp due to some internal error.

 

void setJMSType(mqcstring type)      throw (CJMSException *)

Sets the message type. Some JMS providers use a message repository that contains the definitions of messages sent by applications. The JMSType header field may reference a message's definition in the provider's repository. The JMS API does not define a standard message definition repository, nor does it define a naming policy for the definitions it contains.

Parameters: Type: The message typeReturns: Void

Exceptions: CJMSException

If the JMS provider fails to set the message type due to some internal error.

 

void setLongProperty(mqcstring propName,const mqlong value) throw (CJMSException *);

Sets a long property value with the specified name into the message.

Parameters:

  • Name: The name of the long property
  • Value: The long property value to set.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setObjectProperty(mqcstring propName, mqobject value,const mqint size) throw (CJMSException *);

Sets a object property value with the specified name into the message. This method works only for the objectified primitive object types (Integer, Double, Long...) and String objects.

Parameters:

  • Name: The name of the object property
  • Value: The object property value to set.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setShortProperty(mqcstring propName,const mqshort value) throw (CJMSException *);

Sets a short property value with the specified name into the message.

Parameters:

  • PropName: The name of the short property
  • Value: The short property value to set.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setStringProperty(mqcstring propName, mqcstring value) throw (CJMSException *);

Sets a String property value with the specified name into the message.

Parameters:

  • PropName: The name of the String property
  • Value: The String property value to set.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

 

void setDiscardable(mqboolean isDiscardable) throw (CJMSException *)

Gets the isDiscardable value specified for this message.

Parameters: isDiscardable: boolean value TRUE or FALSE

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the property due to some internal error.

mqboolean isDiscardable() FMQCONST throw (CJMSException *)

Gets the isDiscardable value specified for this message.

Parameters: None

Returns: the Discardable value for this messageExceptions: CJMSExceptionIf the JMS provider fails to set the property due to some internal error.

CTextMessage

A CTextMessage object is used to send a message containing a mqcstring. It inherits from the CMessage class and adds a text message body.

Inheritance Hierarchy

Subclasses

None

Methods

 

mqcstring_unicode getText() FMQCONST

Gets the mqcstring_unicode containing this message's data. The default value is null.

Parameters: None

Returns: The String containing the message's data

Exceptions: CJMSException

If the JMS provider fails to get the text due to some internal error.

 

void setText(mqcstring_unicode)

Sets the mqcstring_unicode containing this message's data.

Parameters:

  • mqcstring_unicode - The String containing the message's data

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to set the text due to some internal error.

CByteMessage

A CBytesMessage object is used to send a message containing a stream of uninterpreted bytes. It inherits from the CMessage class and adds a bytes message body. The receiver of the message supplies the interpretation of the bytes.

Inheritance Hierarchy

Subclasses

None

Methods

mqlong getBodyLength() FMQCONST  throw (CJMSException  *)

Gets the number of bytes of the message body when the message is in read-only mode. The value returned can be used to allocate a byte array. The value returned is the entire length of the message body, regardless of where the pointer for reading the message is currently located.

Parameters: None

Returns: Number of bytes in the message.

Exceptions: CJMSException

 

mqboolean readBoolean() FMQCONST  throw (CJMSException  *)

Reads a boolean from the bytes message stream.

Parameters: None

Returns: The boolean value read

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqbyte readByte() FMQCONST throw (CJMSException  *)

Reads a signed 8-bit value from the bytes message stream.

Parameters: None

Returns: The next byte from the bytes message stream as a signed 8-bit byte

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint readBytes(mqbyteArray value, int length) FMQCONST  throw (CJMSException  *)

Reads a byte array from the bytes message stream. If the length of array value is less than the number of bytes remaining to be read from the stream, the array should be filled. A subsequent call reads the next increment, and so on. If the number of bytes remaining in the stream is less than the length of array value, the bytes should be read into the array. The return value of the total number of bytes read will be less than the length of the array, indicating that there are no more bytes left to be read from the stream.

The next read of the stream returns -1.

Parameters:

  • value - The buffer into which the data is read.
  • length - The length of the buffer.

Returns: The total number of bytes read into the buffer or -1 if there is no more data because the end of the stream has been reached.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqchar readChar() FMQCONST  throw (CJMSException  *)

Reads a Unicode character value from the bytes message stream.

Parameters: None

Returns: The next two bytes from the bytes message stream as a Unicode character

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqdouble readDouble() FMQCONST  throw (CJMSException  *)

Reads a double from the bytes message stream.

Parameters: None

Returns: The next eight bytes from the bytes message stream, interpreted as a double.

Exceptions: CJMSException

 

mqfloat readFloat() FMQCONST  throw (CJMSException  *)

Reads a float from the bytes message stream.

Parameters: None

Returns: The next four bytes from the bytes message stream, interpreted as a float

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

           

mqint readInt() FMQCONST throw (CJMSException  *)

Reads a signed 32-bit integer from the bytes message stream.

Parameters: None

Returns: The next four bytes from the bytes message stream, interpreted as an int

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqlong readLong() FMQCONST throw (CJMSException  *)

Reads a signed 64-bit integer from the bytes message stream.

Parameters: None

Returns: The next eight bytes from the bytes message stream, interpreted as a long.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqshort readShort() FMQCONST       throw (CJMSException  *)

Reads a signed 16-bit number from the bytes message stream.

Parameters: None

Returns: The next two bytes from the bytes message stream, interpreted as a signed 16-bit number

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint readUnsignedByte() FMQCONST throw (CJMSException  *)

Reads an unsigned 8-bit number from the bytes message stream.

Parameters: None

Returns: The next byte from the bytes message stream, interpreted as an unsigned 8-bit number

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint readUnsignedShort() FMQCONST throw (CJMSException  *)

Reads an unsigned 16-bit number from the bytes message stream.

Parameters: None

Returns: The next two bytes from the bytes message stream, interpreted as an unsigned 16-bit integer.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqcstring_unicode readUTF() FMQCONST throw (CJMSException  *)

Reads a mqcstring that has been encoded using a modified UTF-8 format from the bytes message stream.

Parameters: None

Returns: A Unicode mqcstring from the bytes message stream

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

void reset() throw (CJMSException *)

Puts the message body in read-only mode and repositions the stream of bytes to the beginning.

Parameters: None

Returns: None

Exceptions: CJMSException

If the JMS provider fails to reset the message due to some internal error.

 

void writeBoolean(mqboolean value) throw (CJMSException  *)

Writes a boolean to the bytes message stream as a 1-byte value. The value true is written as the value (byte)1; the value false is written as the value (byte)0.

Parameters: Value: The boolean value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeByte(mqbyte value)     throw (CJMSException  *)

Writes a byte to the bytes message stream as a 1-byte value.

Parameters: value- The byte value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeByte(mqbyte value)  throw (CJMSException  *)

Writes a portion of a byte array to the bytes message stream.

Parameters:

  • Value - The byte array value to be written
  • Offset - The initial offset within the byte array
  • Length - The number of bytes to use

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeChar(mqchar value)  throw (CJMSException  *)

Writes a char to the bytes message stream as a 2-byte value, high byte first.

Parameters: value - The char value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeDouble(mqdouble value)  throw (CJMSException  *)

Writes a double from the bytes message stream.

Parameter: value - mqdouble value to be written to the bytes message

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

void writeFloat(mqfloat value)  throw (CJMSException  *)

Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the bytes message stream as a 4-byte quantity, high byte first.

Parameters: value - The float value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeInt(mqint value)   throw (CJMSException  *)

Writes an int to the bytes message stream as four bytes, high byte first.

Parameters: value- The int to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeLong(mqlong value)  throw (CJMSException  *)

Writes a long to the bytes message stream as eight bytes, high byte first.

Parameters: value - The long to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeShort(mqshort value) throw (CJMSException  *)

Writes a short to the bytes message stream as two bytes, high byte first.

Parameters: value: The short to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeUTF(mqcstring_unicode value) throw (CJMSException  *)

Writes a mqcstring to the bytes message stream using UTF-8 encoding in a machine-independent manner.

Parameters: value - The String value to be written

 

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

CMapMessage

The CMapMessage object is used to send a set of name-value pairs. The names must have a value that is not null, and not an empty mqcstring. The entries can be accessed sequentially or randomly by name.CMapMessage inherits from the CMessage class and adds a message body that contains a Map.

Inheritance Hierarchy

Subclasses

None

Methods

mqboolean getBoolean(mqcstring name) FMQCONST throw (CJMSException *)

Returns the boolean value with the specified name.

Parameters: name - Name of the Boolean

Returns: The boolean value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqbyte getByte(mqcstring name) FMQCONST throw (CJMSException *) 

Returns the byte value with the specified name.

Parameters: name - Name of the byte

Returns: The byte value with the specified name.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqchar getChar(mqcstring name) FMQCONST throw (CJMSException *)

Returns the Unicode character value with the specified name.

Parameters: name - Name of the Unicode character

Returns: The Unicode character value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqdouble getDouble(mqcstring name) FMQCONST throw (CJMSException *)

Returns the double value with the specified name.

Parameters: name - Name of the double

Returns: The double value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqfloat getFloat(mqcstring name)FMQCONST throw (CJMSException *)

Returns the float value with the specified name.

Parameters: name - Name of the float

Returns: The float value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint getInt(mqcstring name) FMQCONST  throw (CJMSException *)

Returns the int value with the specified name.

Parameters: name - Name of the int

Returns: The int value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqlong getLong(mqcstring name) FMQCONST  throw (CJMSException *)

Returns the long value with the specified name.

Parameters: name - Name of the long

Returns: The long value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqcstring* getMapNames() FMQCONST  throw (CJMSException *)

Returns a pointer to mqcstrings of all the names in the MapMessage object.

Parameters: None

Returns: An a pointer to all the names (mqcstring) in this MapMessage

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

CHashTableEnumerator *getMapNamesHTEnum() FMQCONST throw (CJMSException *)

Returns an Enumeration of all the names in the MapMessage object.

Parameters: None

Returns: An enumeration of all the names in this MapMessage

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqshort getShort(mqcstring name) FMQCONST  throw (CJMSException *)

Returns the short value with the specified name.

Parameters: name - Name of the short

Returns: The short value with the specified name

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqcstring getString(mqcstring name) FMQCONST throw (CJMSException *)

Returns the String value with the specified name.

Parameters: name - The Name of the String

Returns: The String value with the specified name; if there is no item by this name, a null value is returned.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqboolean itemExists(mqcstring name) FMQCONST  throw (CJMSException *)

Indicates whether an item exists in this MapMessage object.

Parameters: name - Name of the item to test

Returns: TRUE if the item exists

Exceptions: CJMSException

If the JMS provider fails to determine if the item exists due to some internal error.

 

void setBoolean(mqcstring name, const mqboolean value) throw (CJMSException *)

Sets a boolean value with the specified name into the Map.

Parameters

  • Name: The name of the boolean
  • Value: The boolean value to set in the Map

Returns: void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setByte(mqcstring name, const mqbyte value)  throw (CJMSException *)

Sets a byte value with the specified name into the Map.

Parameters

  • Name: The name of the byte
  • Value: The byte value to set in the Map

Return: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setBytes(mqcstring name, mqcstring value,const  mqint length) throw (CJMSException *)

Sets a byte array value with the specified name and length into the Map.

Parameters

  • Name: The name of the byte array
  • Value: The byte array value to set in the Map
  • Length: Number of bytes to be set

Return: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setBytes(mqcstring name, mqbyteArray value) throw (CJMSException *);

Sets a byte array value with the specified name into the Map.

Parameters

  • Name: The name of the byte array
  • Value: The byte array value to set in the Map; the array is copied so that the value for name will not be altered by future modifications

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setBytes(mqcstring name,mqcstring value, const mqint offset, const mqint length) throw (CJMSException *)

Sets a portion of the byte array value with the specified name into the Map.

Parameters

  • Name: The name of the byte array
  • Value: The byte array value to set in the Map
  • offset : The initial offset within the byte array
  • length: The number of bytes to use

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setChar(mqcstring name,const mqchar value) throw (CJMSException *)

Sets a Unicode character value with the specified name into the Map.

Parameters

  • name: The name of the Unicode character
  • Value: The Unicode character value to set in the Map

Returns: Void

Exceptions: MSException

If the JMS provider fails to write the message due to some internal error.

 

void setDouble(mqcstring name, const mqdouble value) throw (CJMSException *)

Sets a double value with the specified name into the Map.

Parameters

  • Name: The name of the double
  • Value: The double value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setFloat(mqcstring name, const mqfloat value)  throw (CJMSException *)

Sets a float value with the specified name into the Map.

Parameters

  • Name: The name of the float
  • Value: The float value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setInt(mqcstring name, const mqint value) throw (CJMSException *)

Sets an int value with the specified name into the Map.

Parameters

  • Name: The name of the int
  • Value: The int value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setLong(mqcstring name, const mqlong value)  throw (CJMSException *)

Sets a long value with the specified name into the Map.

Parameters

  • Name: The name of the long
  • Value: The long value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write b the message due to some internal error.

 

 void setShort(mqcstring name, const mqshort value) throw (CJMSException *)

Sets a short value with the specified name into the Map.

Parameters

  • Name: The name of the short
  • Value: The short value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void setString(mqcstring name, mqcstring value) throw (CJMSException *)

Sets a String value with the specified name into the Map.

Parameters

  • Name: The name of the String
  • Value: The String value to set in the Map

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

CStreamMessage

A CStreamMessage object is used to send a stream of primitive types in C++ programming language. It is filled and read sequentially. It inherits from the CMessage class and adds a stream message body.

Inheritance Hierarchy

Subclasses

None.

Methods

mqboolean readBoolean() FMQCONST  throw (CJMSException *)

Reads a boolean from the stream message.

Parameters: None

Returns: The Boolean value read

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqbyte readByte() FMQCONST  throw (CJMSException *)

Reads a byte value from the stream message.

Parameters: None

Returns: The next byte from the stream message as a 8-bit byte

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint readBytes(mqbyteArray value, mqint length) FMQCONST throw (CJMSException *)

Reads a byte array field from the stream message into the specified value.

Parameters

  • Value: The buffer into which the data is read
  • Length: Length of the byte array

Returns: The total number of bytes read into the buffer, or -1 if there is no more data because the end of the byte field has been reached.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqchar readChar() FMQCONST   throw (CJMSException *)

Reads a Unicode character value from the stream message.

Parameters: None

Returns: A Unicode character from the stream message

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqdouble readDouble() FMQCONST  throw (CJMSException *)

Reads a double from the stream message.

Parameters: None

Returns: A double value from the stream message

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqfloat readFloat() FMQCONST  throw (CJMSException *)

Reads a float from the stream message.

Parameters: None

Returns: A float value from the stream message.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqint readInt() FMQCONST throw (CJMSException *)

Reads a 32-bit integer from the stream message.

Parameters: None

Returns: A 32-bit integer value from the stream message, interpreted as an integer

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqlong readLong() FMQCONST  throw (CJMSException *)

Reads a 64-bit integer from the stream message.

Parameters: None

Returns: A 64-bit integer value from the stream message, interpreted as a long.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqshort readShort() FMQCONST  throw (CJMSException *)

Reads a 16-bit integer from the stream message.

Parameters: None

Returns: A 16-bit integer from the stream message.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

mqcstring readString() FMQCONST  throw (CJMSException *);

Reads a String from the stream message.

Parameters: None

Returns: A mqcstring from the stream message

Note: This string should be manually freed by the user, as it is not freed by deleting the Message Object.

Exceptions: CJMSException

If the JMS provider fails to read the message due to some internal error.

 

void reset() throw (CJMSException *)

Puts the message body in read-only mode and repositions the stream to the beginning.

Parameters: None

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to reset the message due to some internal error.

 

void writeBoolean(mqboolean value)        throw (CJMSException *)

Writes a Boolean to the stream message.

Parameters: value - The Boolean value to be written.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeByte(mqbyte value)     throw (CJMSException *)

Writes a byte to the stream message.

Parameters: value - The byte value to be written.

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeBytes(mqcstring value, mqint length) throw (CJMSException *)

Writes a byte array field to the stream message. The byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.

Parameters

  • Value: The byte array value to be written
  • Length: length of the bytes to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeBytes(mqcstring value,mqint offset,mqint length) throw (CJMSException *)

Writes a portion of a byte array as a byte array field to the stream message. The  portion of the byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.

Parameters:

  • Value: The byte array value to be written
  • Offset: The initial offset within the byte array
  • Length: The number of bytes to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeChar(mqchar value)     throw (CJMSException *)

Writes a char to the stream message.

Parameters: value - The char value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeDouble(mqdouble value)    throw (CJMSException *)

Writes a double to the stream message.

Parameters: value - The double value to be written

Returns: Void

Exceptions: CJMSException

if the JMS provider fails to write the message due to some internal error.

 

void writeFloat(mqfloat value)    throw (CJMSException *)

Writes a float to the stream message.

Parameter: value - The float value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeInt(mqint value) throw (CJMSException *)

Writes an int to the stream message.

Parameters: value - The int value to be written

Returns: Void

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeLong(mqlong value)     throw (CJMSException *)

Writes a long to the stream message.

Parameters: value - The long value to be written

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeShort(mqshort value) throw (CJMSException *)

Writes a short to the stream message.

Parameters: value - The short value to be written

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

 

void writeString(mqcstring value) throw (CJMSException *)

Writes a String to the stream message.

Parameters: value: The String value to be written

Exceptions: CJMSException

If the JMS provider fails to write the message due to some internal error.

CMQAdminService

The CMQAdminService class provides methods for all Admin requests to create Administered Objects.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CMQAdminService(struct _FioranoMQAdminService* pmqas)

Parameters:

  • pmqas – FioranoMQAdminService structure defined in C runtime.

Methods

bool disconnectClient(mqcstring clientID) FMQCONST throw (CJMSException*);

Parameters: None

Returns: Void

Exceptions: CJMSException

 

mqint getNumberOfActiveClientConnections() FMQCONST throw (CJMSException*);

Gets the number of active client connections to the MQ Server.

Parameters: None

Returns: mqint

Exceptions: CJMSException

 

CEnumeration* getDurableSubscribersForTopic(mqcstring topicName) FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the subscriber names on the specified topic.

Parameters: topicName - The topic name.

Returns: Pointer to CEnumeration object of all the subscriber names on the specified topic.

Note: The CEnumeration object contains all the durable subscriber names for the topic.The names can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

CEnumeration* getDurableSubscriberClientIDs() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all durable subscriber client ids which are in both passive and active states.

Parameters: None

Returns: Pointer to CEnumeration object of all the durable subscriber client ids.

Note: The CEnumeration object contains all the durable subscriber client ID’s for the topic.The ID’s can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

CEnumeration* getPTPClientIDs() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all client ids for PTP (Point to Point JMS model).

Parameters: None

Returns: Pointer to CEnumeration object of all the client ids on PTP.

Note: The CEnumeration object contains all the PTP client ID’s for the topic.The ID’s can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

CEnumeration* listActiveClientConnections() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the active connections with MQ server.

Parameters: None

Returns: Pointer to CEnumeration object of all the active connections with MQ server.

Note: The CEnumeration object contains all the active connections. The ID’s can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 CEnumeration* getPubSubClientIDs() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all client ids for PubSub (Publish / Subscribe JMS model).

Parameters: None

Returns: Pointer to CEnumeration object of all the client ids on PubSub.

Exceptions: CJMSException

Note: The CEnumeration object contains all the PUBSUB client ID’s for the topic.The ID’s can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

 

CEnumeration* getSubscriberIDs(mqcstring clientID) FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all subscriber ids on the specified client id.

Parameters: clientID -String representing the client id.

Returns: Pointer to CEnumeration object of all the Subscriber ids on the specified client id.

Note: The CEnumeration object contains all the Subscriber ID’s for the topic.The ID’s can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

mqcstring getSubscriptionTopicName(mqcstring clientID, mqcstring subscriberID) FMQCONST throw (CJMSException*)

Returns a mqcstring subscription topic name for the specified clientID and subscriberID combo.

Parameters:

  • clientID - String representing the client id
  • subscriberID - String representing the subscriber id.

Returns: mqcstring- subscription topic name for the specified clientID and subscriberID combo.

Exceptions: CJMSException

 

mqlong getNumberOfDeliverableMessages1(mqcstring queueName) FMQCONST throw (CJMSException*)

Returns a mqlong object for the number of deliverable messages on the specified queue.

Parameters: queueName - String representing the queue name.

Returns: The number of deliverable messages on the specified queue.

Exceptions: CJMSException

 

mqlong getNumberOfDeliverableMessages2(mqcstring clientID, mqcstring subscriberID) FMQCONST

throw (CJMSException*)

Returns a mqlong object for the number of deliverable messages on the specified clientID and subscriberID combo.

Parameters:

  • clientID - String representing the client id.
  • subscriberID - String representing the subscriber id.

Returns The number of deliverable messages on the specified clientID and subscriberID combo.

Exceptions: CJMSException

 

mqlong getNumberOfUndeletedMessages(mqcstring queueName) FMQCONST throw (CJMSException*)

Returns a mqlong object for the number of undeleted messages on the server for the specified queue name.

Parameters: queueName - String representing the queue Name.

Returns: boolean value for success or failure from the server..

Exceptions: CJMSException

 

mqboolean unsubscribe(mqcstring clientID, mqcstring subscriberID) FMQCONST throw (CJMSException*)

Unsubcribes a durable subscriber for the specified clientID and subscriberID combo.

Parameters:

  • clientID - String representing the client id.
  • subscriberID - String representing the subscriber id.

Returns:  boolean value for success or failure from the server..

Exceptions: CJMSException

 

mqboolean purgeSubscriptionMessages(mqcstring clientID, mqcstring subscriberID) FMQCONST

 throw (CJMSException*)

Purge all messages for a durable subscriber for the specified clientID and subscriberIDcombination.

Parameters:

  • clientID - String representing the client id.
  • subscriberID - String representing the subscriber id.

Returns:  boolean value for success or failure from the server..

Exceptions: CJMSException

 

mqboolean createTopic(const CTopicMetaData* topicMetaData) FMQCONST throw (CJMSException*)

Creates a topic with the specified topic meta-data on the MQ Server.

Parameters: topicMetaData – pointer to CTopicMetaData object.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean createQueue(const CQueueMetaData* queueMetaData) FMQCONST throw (CJMSException*)

Creates a queue with the specified queue meta data on the MQ Server.

Parameters: topicName - String representing the topic name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean deleteTopic(mqcstring topicName) FMQCONST throw (CJMSException*)

Delete a topic with the specified topic name.

Parameters: topicName - String representing the topic name.

 

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean deleteQueue(mqcstring queueName) FMQCONST throw (CJMSException*)

Delete a queue with the specified queue name.

Parameters: queueName - String representing the queue name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean deleteTopicConnectionFactory(mqcstring tcfName) FMQCONST throw (CJMSException*)

Delete a topicConnectionFactory with the specified topicConnectionFactory name.

Parameters:

  • tcfName - String representing the topic connection factory name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean deleteQueueConnectionFactory(mqcstring qcfName) FMQCONST throw (CJMSException*)

Delete a queueConnectionFactory with the specified queueConnectionFactory name.

Parameters:

  • qcfName - String representing the queue connection factory name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean deleteAdminConnectionFactory(mqcstring acfName) FMQCONST throw (CJMSException*)

Delete a adminConnectionFactory with the specified adminConnectionFactory name.

Parameters:

  • acfName -String representing the admin connection factory name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean createTopicConnectionFactory( const CTopicConnectionFactoryMetaData *tcfMetaData) FMQCONST throw (CJMSException*)

Creates a topicConnectionFactory with the specified topicConnectionFactory meta data on the MQ Server.

Parameters:

  • tcfMetaData – pointer to CTopicConnectionFactoryMetaData object.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean createQueueConnectionFactory( const CQueueConnectionFactoryMetaData *qcfMetaData) FMQCONST throw (CJMSException*)

Creates a queueConnectionFactory with the specified queueConnectionFactory meta data onthe MQ Server.

Parameters:

  • qcfMetaData – pointer to CQueueConnectionFactoryMetaData object.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean createAdminConnectionFactory( const CAdminConnectionFactoryMetaData *acfMetaData) FMQCONST throw (CJMSException*)

Creates a adminConnectionFactory with the specified adminConnectionFactory meta data on the MQ Server.

Parameters:

acfMetaData – pointer to CAdminConnectionFactoryMetaData object.

Returns: mqboolean value for success or failure from the server.

Exceptions: CJMSException

 

CEnumeration* getCurrentUsers() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the current users on the MQ Server.

Parameters: None

Returns: Pointer to CEnumeration object of all the current users on the MQ Server.

Note: The CEnumeration object contains all the current users.The users can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

mqboolean restartServer() FMQCONST throw (CJMSException*)

Restarts the MQ Server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean shutdownServer() FMQCONST throw (CJMSException*)

Shuts down the MQ Server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean shutDownActiveHAServer() FMQCONST throw (CJMSException*)

Shuts down the Active HA MQ Server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean shutDownPassiveHAServer() FMQCONST throw (CJMSException*)

Shuts down the Passive HA MQ Server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean purgeQueueMessages2(mqcstring queueName, const mqboolean forcefully) FMQCONST

  throw (CJMSException*)

Purges all the messages on the specified queue forcefully.

Parameters:

  • queueName - String representing the queue name.
  • forcefully - boolean representing whether the messages in the queue have to be purged forcefully, irrespective of active consumers.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean purgeQueueMessages1(mqcstring queueName) FMQCONST throw (CJMSException*)

Purges all the messages on the specified queue,if no active consumer is present.

Parameters:

  • queueName - String representing the queue name.

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean showStatusOfAllQueues() FMQCONST throw (CJMSException*)

Shows the status of all the queues on the server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqint deleteMessagesOnServer(mqcstring queueName, const mqlong startIndex, const mqlong endIndex, const mqint priority) FMQCONST throw (CJMSException*)

Delete messages on the specified queue with start index upto the end index and with specified priority.

Parameters:

  • queueName - String representing the queue name.
  • startIndex - mqlong start index.
  • endIndex - mqlong end index.
  • Priority - Mqint message priority.

Returns: integer representing the number of messages deleted on the server.

Exceptions: CJMSException

 

mqboolean loadAdminObjects() FMQCONST throw (CJMSException*)

Load admin objects on the server.

Parameters: None

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean allowIpAddress(mqstring ipAddress) FMQCONST throw (CJMSException*);

Adds the given ipAddress into allowable ipAddress list

Parameters: ipAddress – ipAddress which is to be added into the allowable list

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean allowIpAddressRange(mqstring startIpAddress, mqstring endIpAddress) FMQCONST throw (CJMSException*);

Adds the given ipAddress range into allowable ipAddress list

Parameters:

startIpAddress – Starting ip of the given range

endIpAddress – Ending ip of the given range

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean removeIpAddress(mqstring ipAddress) FMQCONST throw (CJMSException*);

Removes the given ipAddress from the allowable ipAddress list

Parameters: ipAddress – ipAddress which is to be added into the allowable list

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

mqboolean removeIpAddressRange(mqstring startIpAddress, mqstring endIpAddress) FMQCONST throw (CJMSException*);

Removes the given ipAddress range from the allowable ipAddress list

Parameters:

startIpAddress – Starting ip of the given range

endIpAddress – Ending ip of the given range

Returns: boolean value for success or failure from the server.

Exceptions: CJMSException

 

CEnumeration* allowIpAddressList(std::set<mqstring>* ipAddressList) FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the failed ipAddress which cannot be added into the allowable ipAddress list

Parameters: ipAddressList – Pointer to the std:set which contains the list of Address to be added

Returns: Pointer to CEnumeration object of all the failed ipAddress.

Note: The CEnumeration object contains all the failed ipAddress. The users can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

CEnumeration* removeIpAddressList(std::set<mqstring>* ipAddressList) FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the failed ipAddress which cannot be removed from  the allowable ipAddress list

Parameters: ipAddressList – Pointer to the std:set which contains the list of Address to be removed

Returns: Pointer to CEnumeration object of all the failed ipAddress.

Note: The CEnumeration object contains all the failed ipAddress. The users can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

 

CEnumeration* listAllAllowedIps() FMQCONST throw (CJMSException*)

Returns a pointer to enumeration of all the allowed ipAddresses.

Parameters: None

Returns: Pointer to CEnumeration object of all the allowed ipAddresses.

Note: The CEnumeration object contains all the allowed ipAddresses. The users can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns void* and it should be type casted to const char *.

Exceptions: CJMSException

CHashTable

This class implements a hashtable, which maps keys to values. Any non-null mqobject can be used as a value and any non-null mqcstring can be used as a key.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CHashTable() throw (CJMSException *);

Constructs a new, empty hashtable.

Parameters: None

Methods

mqobject Put(mqcstring key, mqobject value) throw (CJMSException *)

Maps the specified key to the specified value in this hashtable. Neither the key nor the value can be null.

Parameters:

  • Key –The string which acts as a key.
  • Value - the value mapped to the key which should be casted to mqobject

Returns: mqobject

Exceptions: CJMSException

 

mqobject Get(mqcstring key) FMQCONST throw (CJMSException *)

Returns the value to which the specified key is mapped in this hashtable.

Parameters: Key – The string which acts as a key.

Returns: mqobject

Exceptions: CJMSException

 

mqobject RemoveElement(mqcstring key) throw (CJMSException *)

Removes the key (and its corresponding value) from this hashtable. This method does nothing if the key is not in the hashtable.

Parameters: Key – The string which acts as a key.

Returns: mqobject

Exceptions: JMSException

 

mqboolean ContainsValue(mqobject value) throw (CJMSException *)

Checks if the given value exists in this hashtable.

Parameters:

  • Value - the value mapped to the key which should be casted to mqobject

Returns: True if value is present, False otherwiseExceptions: CJMSException

 

mqboolean ContainsKey(mqcstring key) throw (CJMSException *)

Checks if the given key exists in this hashtable.

Parameters:

  • Key – The string which acts as a key.

Returns: True if value is present, False otherwiseExceptions: CJMSException 

CHashTableEnumerator

This is the enumeration class that gets the contents of the CHashTable as an enumerated object.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CHashTableEnumerator(struct _HashtableEnumerator *htenum); throw (CJMSException *);

Parameters:

  • htenumHashtableEnumerator structure defined in C runtime.

Methods

mqboolean hasMoreElements() FMQCONST

Tests if this enumeration contains more elements.

Parameters: None

Returns: Returns true if enumeration contains more elements otherwise it returns false

           

mqcstring nextKeyElement() FMQCONST

Returns the nextKey value of this enumeration if this enumeration object has at least one more element to provide.

Parameters: None

Returns:

  • mqcstring  - Returns the next Key value

 

mqobject nextValueElement() FMQCONST

Returns the next value element of this enumeration if this enumeration object has at least one more element to provide

Parameters: None

Returns:

  • mqobject - Returns the next value Element

CLogHandler

This class is used for logging to a file. It is a singleton class and only one instance of Logger exists for the whole application.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CLogHandler() throw (CJMSException*);

Default constructor

Methods

static mqboolean setLoggerName(mqstring name) throw (CJMSException*)

Sets file name [in which data is logged] to name. The default file name is cclient.

For example, CLogHandler::setLoggerName("Publisher");

       Parameters: Logger name

       Returns: Boolean returning true or false

       Exceptions: CJMSException

 

static CLogHandler* getLogHandler() throw (CJMSException*)

This function gets the reference to the LogHandler, using which data can be logged from application.

       Parameters: None

       Returns: Reference to CLogHandler

       Exceptions: CJMSException

 

mqboolean setTraceLevel(mqstring level)

The trace level can also be set using this function. The legal values for the "level" are:

  1. ERROR
  2. INFO
  3. DEBUG

       Parameters level - Trace level in mqstring

       Returns: Boolean returning true or false

 

mqboolean logData(mqstring info, ...) throw (CJMSException*)

It logs the given data to the log file. This function is variable argument function. The usage of this function is similar to printf function.

Example:

         CLogHandler *logger = CLogHandler::getLogHandler();

         logger->logData("Logging from file - %s, func -%s", "FileName", "funcName");

         In log file it is printed as follows:

              Fri Dec 19 14:41:25 2008 :APPL: Logging from file - FileName, func –funcName

       Parameters: User defined

       Returns: Boolean returning true or false

       Exceptions: CJMSException 

CCSPManager

This class is used to create CSPBrowser, which is used for browsing messages stored in CSP cache.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CCSPManager(mqcstring cspPath)

Constructors are used for creating CCSPManager class.

Parameters:  The path to the CSP has to be given as parameter to the constructor.

Methods

CCSPBrowser* createCSPBrowser() throw (CJMSException *)

Creates CCSPBrowser for the location specified for the manager.

Parameters: None

Returns: Returns CCSPBrowser pointer.

Exceptions: CJMSException 

CCSPBrowser

CSP Browser is used to browse the messages stored in Client-Side Persistent Cache. While browsing, messages are read from CSP and are not deleted. So, next time when the Server is re-connected, messages are sent to the Server. The classes used for CSP Browsing are CCSPBrowser and CCSPEnumeration.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CCSPBrowser(struct _CSPBrowser *m_cspBrowser)

Parameters:

  • m_cspBrowser – CSPBrowser structure defined in C runtime.

Methods

CEnumeration* getAllConnections() FMQCONST   throw (CJMSException *)

This function returns the enumeration of all the Connection IDs whose messages are stored in CSP

       Parameters: None

       Returns: returns the enumeration of all the Connection IDs

       Note: The CEnumeration object contains all the Connection IDs whose messages are stored in CSP. The names can be retrieved from the CEnumeration object using nextElement method. The nextElement                    method returns void* and it should be type casted to const char *.

       Exceptions: CJMSException

           

CEnumeration* getTopicsForConnection(mqcstring connectionID) FMQCONST throw (CJMSException *)

This function returns the Enumeration of all the topic names for the specified connection with clientID as connectionID.

       Parameters : connectionID - clientID as string

       Returns: returns the enumeration of all the topic names

       Note: The CEnumeration object contains all the topic names for the specified connection.The names can be retrieved from the CEnumeration object using nextElement method.The nextElement method returns              void* and it should be type casted to const char *.

       Exceptions: CJMSException

 

CEnumeration* getQueuesForConnection(mqcstring connectionID) FMQCONST throw (CJMSException *)

This function returns the Enumeration of all the queue names for the specified connection with clientID as connectionID.

       Parameters : connectionID - clientID as string

       Returns: returns the enumeration of all the queue names

       Note: The CEnumeration object contains all the queue names for the specified connection. The names can be retrieved from the CEnumeration object using nextElement method. The nextElement method returns          void* and it should be type casted to const char *.

       Exceptions: CJMSException

 

CCSPEnumeration* browseMessagesOnQueue(mqcstring queueName, mqboolean checkTransacted) FMQCONST throw (CJMSException *)

This function returns the enumeration of messages stored in the queue specified by queueName. It searches for messages in queue in all the existing connections.

       Parameters

                  queueName - Name of the queue to browse as mqcstring

                   checkTransacted - If checkTransacted is TRUE, transacted messages are also browsed.

       Returns: returns the enumeration of all the messages in queue

       Exceptions: CJMSException

 

CCSPEnumeration* browseMessagesOnQueue(mqcstring connectionID, mqcstring queueName, mqboolean checkTransacted) FMQCONST throw (CJMSException *)

This function returns the enumeration of messages stored in the queue specified by queueName. It searches for messages in queue for the connection specified by connectionID. If checkTransacted is TRUE, transacted messages are also browsed.

       Parameters

                 connectionID - clientID as string

                  queueName - Name of the queue to browse as mqcstring

                  checkTransacted - If checkTransacted is TRUE, transacted messages are also browsed.

       Returns: returns the enumeration of all the messages in queue

       Exceptions: CJMSException

 

CCSPEnumeration* browseMessagesOnTopic(mqcstring topicName,mqboolean checkTransacted) FMQCONST throw (CJMSException *)

This function returns the enumeration of messages stored in the topic specified by topicName. It searches for messages in topic in all the existing connections.

       Parameters

                 topicName - Name of the topic to browse as mqcstring

                  checkTransacted - If checkTransacted is TRUE, transacted messages are also browsed.

       Returns: returns the enumeration of all the messages in topic

       Exceptions: CJMSException

 

CCSPEnumeration* browseMessagesOnTopic(mqcstring connectionID, mqcstring topicName, mqboolean checkTransacted) FMQCONST throw (CJMSException *)

This function returns the enumeration of messages stored in the topic specified by topicName. It searches for messages in topic for the connection specified by connectionID.

       Parameters

                  connectionID - clientID as string

                   topicName - Name of the topic to browse as mqcstring

                   checkTransacted - If checkTransacted is TRUE, transacted messages are also browsed.

       Returns: returns the enumeration of all the messages in topic

       Exceptions: CJMSException

 

mqlong numberOfMessagesinQueue(mqcstring connID, mqcstring queueName,mqboolean checkTransacted)  FMQCONST  throw (CJMSException *)

This function returns the number of messages stored in the queue specified by queueName for a given connection with clientID connID.

       Parameters

                   connID - clientID as string

                    queueName - Name of the queue to browse as mqcstring

                    checkTransacted - If checkTransacted is TRUE, transacted messages are also counted.

       Returns: returns the messages count in mqlong

       Exceptions: CJMSException

 

mqlong numberOfMessagesinTopic(mqcstring connID, mqcstring topicName, mqboolean checkTransacted)  FMQCONST  throw (CJMSException *)

This function returns the number of messages stored in the topic specified by topicName for a given connection with clientID connID.

       Parameters :

                 connectionID - clientID as string

                 topicName - Name of the topic to browse as mqcstring

                  checkTransacted - If checkTransacted is TRUE, transacted messages are also counted.

       Returns: returns the messages count in mqlong

       Exceptions: CJMSException 

CCSPEnumeration

This is the enumeration class that gets the list of messages from CSP Cache.

Inheritance Hierarchy

None

Subclasses

None

Constructors

CCSPEnumeration(CSPEnumeration cspe);

       Parameterscspe – CSPEnumeration structure defined in C runtime.

Methods

mqboolean hasMoreElements() FMQCONST  throw (CJMSException *)

This function checks whether more elements are available in the enumeration.

       Parameters: None

       Returns: returns true/false

       Exceptions: CJMSException

 

CMessage* nextElement() FMQCONST  throw (CJMSException *)

This function returns the next element of this enumeration if this enumeration object has at least one more element to provide.

       Parameters: None

       Returns: returns the next CMessage

       Exceptions: CJMSException 

Adaptavist ThemeBuilder EngineAtlassian Confluence