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
CMQAdminConnectionFactory
CQueue
CTopic

Constructors


CLookupHelper()
Default constructor

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(CMap<mqstring,mqstring>& environment);
Constructs an initial context using the supplied environment. This constructor will not modify environment or save a reference to it, but may save a clone.
Parameters: environment - CMap to map key value pairs.
Example:
m_env.Put(CFioranoContext::SECURITY_PRINCIPAL, m_usrName);
m_env.Put(CFioranoContext::SECURITY_CREDENTIALS,m_usrPasswd);
m_env.Put(CFioranoContext::CONNECT_URL,m_providerURL);
m_env.Put(CFioranoContext::BACKUP_URLS,m_backupURL);
m_env.Put(CFioranoContext::PROVIDER_URL,m_providerURL);
CInitialContext* m_ic = new CInitialContext(m_env);

Methods


CLookupHelper* Lookup(mqcstring name) throw (NamingException& );
Retrieves the named object of type CLookupHelper class. The CLookupHelper class can be dynamically casted to one of:

  • CTopicConnectionFactory
  • CQueueConnectionFactory
  • CMQAdminConnectionFactory
  • CQueue
  • CTopic



CTopicConnectionFactory* LookupTCF(mqcstring tcfName)throw(NamingException&);
Retrieves the named administered object from FioranoMQ's JNDI store. This method is used in the scenario of serverless mode.
Parameters: tcfName – Name of the administered object to be looked up.
Returns: CTopicConnectionFactory
Exceptions: NamingException.
CQueueConnectionFactory* LookupQCF(mqcstring qcfName)throw (NamingException&);
Retrieves the named administered object from FioranoMQ's JNDI store. This method is used in the scenario of serverless mode.
Parameters: qcfName – Name of the administered object to be looked up.
Returns: CQueueConnectionFactory
Exceptions: NamingException.

CAdvisoryMessage

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

Inheritance Hierarchy

None

Constructors


CAdvisoryMessage();
Default Constructor
CAdvisoryMessage(mqbyte type);
Creates an advisory message object of specified type
Parameters: type – type of the advisory message
The value of type can be on the following

  • 0 – CONNECTION_STATE_CHANGED
  • 1 - CSP_STATE_CHANGED
  • 2 – CSP_ERROR_MESSAGE
  • 3 - CLIENT_APP_ERROR_MESSAGE
  • 4 - REALM_SERVICE_ADVISORY_MSG_TYPE

CAdvisoryMessage(mqbyte type, mqcstring message);
Creates an advisory message object of specified type with the specified message string.
Parameters:

  • type - Type of advisory message.
  • message - Advisory message string.

Subclasses

None

Methods


mqcstring getMessage();Returns message for object.Parameters: None
Returns: The advisory message string for the object.
Exceptions:None.
mqbyte getType();
Returns the type of Advisory message.
Parameters: None
Returns: The advisory message type for the object.
Exceptions:None
void setStrMessage(mqcstring strMessage);
Sets the advisory message string.
Parameters: strMessage - The advisory message string to be set.
Returns: void.
mqcstring toString();
Returns a string containing the advisory message type and message
Parameters: None.
Returns: String containing the advisory message type and message.
Exceptions:None.

CAdvisoryMsgListener

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

Inheritance Hierarchy

None

Subclasses

None

Methods

virtual void onAdvisoryMessage(CAdvisoryMessage* advisoryMessage) = 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: advisoryMessage – CAdvisoryMessage
Returns: void

Exception

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

Inheritance Hierarchy

Cppnativertl::Exception
cppnativertl:: CTopic
cppnativertl:: CTopic
std::exception
cppnativertl:: CTopic
cppnativertl:: CTopic




Subclasses

  • CJMSException
  • CloneNotSupportedException
  • IllegalArgumentException
  • IOException
  • MemoryAllocationException
  • NamingException
  • MessageEOFException
  • NoSuchElementException
  • NoSuchMethodException
  • RuntimeException
  • UnsupportedOperationException

Constructors



Exception( const mqchar *** file, const mqint lineNumber, const mqchar* func, mqcstring msg);
Creates a new Exception with the given message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.


Exception( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg);*
Creates a new Exception with the given errorcode, message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.


Exception( const mqchar file, const mqint lineNumber, const mqchar* func, Exception& cause);*
Creates a new Exception with the given root cause and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • cause – Root Cause for this exception


Exception( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg, Exception& cause);*
Creates a new Exception with the given root cause, message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

Exception( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring msg, Exception& cause);*
Creates a new Exception with the given root cause, errorcode , message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

Methods

virtual mqcstring getErrorCode() const;
Returns the error code set.
Parameters: None
Returns: mqcstring
virtual void setErrorCode(mqcstring errorcode);
Sets the specified error code.
Parameters: error code - Error code to be set
Returns: void
virtual mqcstring getMessage() const;
Returns the error message.
Parameters: None
Returns: mqcstring
virtual const mqchar* what() const throw ();
Returns the const char* of getMessage()
Parameters: None
Returns: mqchar*
virtual void setMessage( mqcstring msg );
Sets the cause for this CJMSException.
Parameters: msg - Error message to be set
Returns: void
virtual void setMark( const mqchar * file, const mqint lineNumber, const mqchar func);*
Adds a file, line number to the stack trace.
Parameters:

  • File - File name where the exception is set.
  • lineNumber - Line number where the exception is set.
  • func – Function at which the exception is created

Returns: void
virtual Exception clone() const;*
Clones this Exception. This is useful for cases where you need to preserve the type of the original Exception as well as the error message.
Parameters: None
Returns: Exception*
virtual std::vector< std::pair< mqstring, mqint> > getStackTrace() const;
Provides the stack trace for every point where this CJMSException was caught, marked, and rethrown. The first item in the returned vector is the first point where the mark was set (e.g. where the CJMSException was created).
Parameters: None
Returns: Vector containing the file and line information where it is set initially.
virtual void printStackTrace() const;
Prints the stack trace to std::err
Parameters: None
Returns: void
virtual void printStackTrace( std::ostream& stream ) const;
Prints the stack trace to to the given std::ostream
Parameters: stream – std::ostram to which the stacktrace has to be written.
Returns: void
virtual mqstring getStackTraceString() const;
Gets the stack trace as one contiguous string.
Parameters: None
Returns: mqstring - The stack trace as std::string
Exception& getLinkedException() throw (NoSuchElementException&);
Gets the linked Exception associated with this exception
Parameters: None
Returns: Exception& - linked exception
Exceptions : NoSuchElementException – if no linkedException is found.

CJMSException

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

Inheritance Hierarchy

Cppnativertl::CJMSException
cppnativertl:: CTopic
cppnativertl:: CTopic
Cppnativertl::Exception
cppnativertl:: CTopic
cppnativertl:: CTopic




Subclasses

  • FioranoException
  • FioranoSelectorException
  • IllegalStateException
  • InvalidClientIDException
  • InvalidDestinationException
  • InvalidSelectorException
  • MessageEOFException
  • MessageFormatException
  • MessageNotReadableException
  • MessageNotWriteableException
  • ResourceAllocationException
  • TransactionInProgressException
  • TransactionRolledBackException

Constructors


CJMSException()
Default Constructor.
CJMSException( cException& ex );
Creates a new CJMSException with the given cause.
Parameters: ex – Root cause for this CJMSException
CJMSException( const mqchar *** file, const mqint lineNumber, const mqchar* func, mqcstring msg);
Creates a new CJMSException with the given message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.


CJMSException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg);*
Creates a new CJMSException with the given errorcode, message and from where it gets occurred..
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.


CJMSException( const mqchar file, const mqint lineNumber, const mqchar* func, Exception& cause);*
Creates a new CJMSException with the given root cause and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • cause – Root Cause for this exception


CJMSException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode,* mqcstring msg, Exception& cause);
Creates a new CJMSException with the given root cause, message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

CJMSException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring msg, Exception& cause);*
Creates a new CJMSException with the given root cause, errorcode , message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

FioranoException

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

Inheritance Hierarchy

FioranoException
cppnativertl:: CTopic
cppnativertl:: CTopic
cppnativertl::CJMSException
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

  • ConnectionKilledException
  • DurableSubscriberKilledException
  • FioranoShutDownException
  • IllegalOperationException
  • IncompatibleVersionException
  • InvalidArgumentException
  • InvalidClassNameException
  • InvalidKeyException
  • InvalidStateException
  • MessageProcessingException
  • SecurityViolationException
  • UnsuccessfulOperationException
  • UnsupportedAlgorithmException

Constructors

FioranoException();
Default constructor.
FioranoException(Exception& ex );
Creates a new FioranoException with the given cause.
Parameters: ex – Root cause for this FioranoException
FioranoException( const mqchar * file, const mqint lineNumber, const mqchar func, mqcstring msg);*
Creates a new FioranoException with the given message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.

FioranoException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg);*
Creates a new FioranoException with the given errorcode , message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.


FioranoException( const mqchar file, const mqint lineNumber, const mqchar* func, Exception& cause);*
Creates a new FioranoException with the given root cause and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • cause – Root Cause for this exception


FioranoException ( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg, Exception& cause);*
Creates a new FioranoException with the given root cause, message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

FioranoException ( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring msg, Exception& cause);*
Creates a new FioranoException with the given root cause, errorcode , message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

CExceptionListener

If Native C++ RTL 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(CJMSException& ex) = 0;
Notifies the user of JMS exception. The user is expected to override this function with the required functionality in the client application.
Parameters : ex: Exception message handleReturns: void

CMessageListener

A CMessageListener object is used to receive asynchronously delivered messages. The CMessageListener passes a message to the message 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.
Note: Don't delete the msg object instance inside the onMessage, deletion of this object is handled inside the Rtl itself.
Parameters: Msg: The message passed to the listener
Returns: Void

CMQAdminConnectionFactory

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

Inheritance Hierarchy

CMQAdminConnectionFactory
cppnativertl:: CTopic
cppnativertl:: CTopic
CLookUpHelper
cppnativertl:: CTopic
cppnativertl:: CTopic




Subclasses

None

Constructors

CMQAdminConnectionFactory(CMap<mqstring, mqstring>& env);
Parameters: env - The initial context environment variable to be set.
CMQAdminConnectionFactory(CAdminConnectionFactoryMetaData metaData);*
Parameters: metaData – The AdminConnectionFactoryMetaData instance.

Methods

void setName(mqstring strName);
Set the Name of this MetaData Object
Parameters: strName: User who belongs Administrators group of Fiorano Security realm
Returns: void
CAdminConnectionFactoryMetaData getMetaData();*
Returns the AdminConnectionFactoryMetaData instance representing this Connection Factory.
Parameters: None
Returns: The AdminConnectionFactoryMetaData instance
CMQAdminConnection createMQAdminConnection()throw (FioranoException&);*
Creates an Admin connection with the FioranoMQ Server using the default credentials.
Parameters: None
Returns: CMQAdminConnection
Exceptions: FioranoException
CMQAdminConnection createMQAdminConnection(mqstring userName, mqstring password)throw (FioranoException&);*
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: CMQAdminConnection
Exceptions: FioranoException
CMap<mqstring, mqstring>& getICEnvironment();
Get the initial context environment used for creating this connection factory.
Parameters: None
Returns: The CMap that contains the environment variables set.

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

  • CQueueConnectionFactory
  • CTopicConnectionFactory
  • CUnifiedConnectionFactory

Methods


CConnection createConnection()* throw (CJMSException&);
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 - if the JMS fails to create context due to some internal error
CConnection createConnection(mqcstring userName, mqcstring password)*
throw (CJMSException&)
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.
Parameters:

  • username – Name of the user
  • password – User's password

Returns: CConnection object
Exceptions: CJMSException - if the JMS fails to create context due to some internal error.
JMSContext createContext() throw (JMSRuntimeException&);*
Creates a JMSContext with the default user identity and default sessionMode. A connection and session are created for use by the new JMSContext.The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Parameters: None
Returns: JMSContext object.
Exceptions: JMSRuntimeException - if the JMS fails to create context due to some internal error
JMSContext createContext(mqcstring userName, mqcstring password) throw (JMSRuntimeException&)*
Creates a JMSContext with the specified user identity and default sessionMode. A connection and session are created for use by the new JMSContext.The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Parameters:

  • username – Name of the user
  • password – User's password

Returns: JMSContext object
Exceptions: JMSRuntimeException - if the JMS fails to create context due to some internal error
JMSContext createContext(mqcstring userName, mqcstring password , const mqint sessionMode) throw (JMSRuntimeException&);*
Creates a JMSContext with the specified user identity and specified sessionMode. A connection and session are created for use by the new JMSContext.The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Parameters:

  • username – Name of the user
  • password – User's password
  • sessionMode – inidicates the sessionMode in which the context is to be created. SessionMode's possible values are 0 – Transacted, 1 – Auto-ack mode( default ack mode), 2 – Client-ack mode, 3 – Dups-ok ack mode.

Returns: JMSContext object
Exceptions: JMSRuntimeException - if the JMS fails to create context due to some internal error
JMSContext createContext(const mqint sessionMode) throw (JMSRuntimeException&);*
Creates a JMSContext with the default user identity and specified sessionMode. A connection and session are created for use by the new JMSContext.The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Parameters: sessionMode – inidicates the sessionMode in which the context is to be created. SessionMode's possible values are 0 – Transacted, 1 – Auto-ack mode( default ack mode), 2 – Client-ack mode, 3 – Dups-ok ack mode.
Returns: JMSContext object
Exceptions: JMSRuntimeException - if the JMS fails to create context due to some internal error

CConnectionFactoryBase

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 CConnectionFactoryBase is an abstract base class.

Inheritance Hierarchy

None

Subclasses

  • CQueueConnectionFactory
  • CTopicConnectionFactory
  • CUnifiedConnectionFactory

Constructors

CConnectionFactoryBase();
Default Constructor

Methods


mqcstring getName();
Get the Name of the Administered Object.
Parameters: None
Returns: Name of the administered object
mqcstring getDescription();
Get the description of the Administered Object.
Parameters: None
Returns: The description about the administered object.
mqcstring getConnectURL();
Returns the connection URL string.
Parameters: None
Returns: URL Connection string
mqcstring getSecondaryConnectURL();
Get the semicolon seperated Secondary Connection URLs for this connection factory. If secondary URL doesnot exist, it returns null.This API is supported only for backward compatibility.
Parameters: None
Returns: The secondary URL string
mqcstring getConnectionClientID();
Returns the Connection ClientID for this MetaData.
Parameters: None
Returns: ClientID of this ConnectionFactory's MetaData
mqboolean isPingDisabled();
Returns ping disabled for object.
Parameters: None
Returns: true/false which indicates the status
mqcstring getDurableConnectionBaseDir();
Gets the Durable Connection base directory for this metadata as a string.
Parameters: None
Returns: Durable Connection base directory for this metadata as a string.

void setName(mqcstring strName);
Set the Name of this MetaData Object.
Parameters: strName – Name of the metaData
void setDescription(mqcstring strDescription);
Set the description of the MetaData Object.
Parameters: strDescription - Description of the MetaData Object
void setConnectURL(mqcstring strConnectURL);
Set the primary Connect URL.
Parameters: strConnectURL – Connect URL string
void setSecondaryConnectURL(mqcstring strSecondaryConnectURL);
Set the secondary Connection URL for this Connection Factory. If no secondary Connection URL exists for this connection factory, it creates new Connection Factory URLs list from the semi colon seperated param. Otherwise it replaces the existing secondaryConnectURL by the params. This API is supported only for backward compatibility. Please Use setBackupConnectURLs(mqstring param)for future use.
Parameters: strSecondaryConnectURL – SecondaryConnectURL string
void setConnectionClientID(mqcstring clientID);
Sets the ClientID for this MetaData.
Parameters: clientID - ConnectionClientID for this metaData
void setDurableConnectionBaseDir(mqcstring durBaseDir);
Sets durable connection base directory for object.
Parameters:durBaseDir – Durable Base Directory as a string
void disablePing(mqboolean ping);
Disables the ping functionality for this ConnectionFactory.
Parameters: ping – Boolean indicates whether to enable/disable ping functionality

CUnifiedConnectionFactory

A client uses a CUnifiedConnectionFactory object to create unified Connection objects to use with PTP and PubSub messaging models.
Inheritance Hierarchy
cppnativertl::CUnifiedConnectionFactory
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionFactory, CConnectionFactoryBase, CLookUpHelper
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

None

Constructors

CUnifiedConnectionFactory();
Default Constructor
CUnifiedConnectionFactory(struct _ConnectionFactory *pcf);
Parameters:

  • pcf – pointer to the ConnectionFactory C structure.


CUnifiedConnectionFactory(CHashTable *env, mqstring connectionFactoryName)throw (CJMSException&);
Creates a ConnectionFactory with the specified name and specified environment variableswithout using JNDI lookup.
Parameters:

  • env - CMap<mqstring,mqstring> 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

CQueueConnectionFactory

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

Inheritance Hierarchy

CQueueConnectionFactory
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionFactoryBase, CQueueConnectionFactoryBase, CLookUpHelper
cppnativertl:: CTopic
cppnativertl:: CTopic




Subclasses

None

Constructors

CQueueConnectionFactory();
Default Constructor.
CQueueConnectionFactory(CConnectionFactoryMetaData qmd,* CMap<mqstring,mqstring>& env);
Creates a new QueueConnectionFactory with the specified metadata and with thespecified properties on the hashtable, without using JNDI lookup.
Parameters:

  • qmd – pointer to the QueueMetaData.
  • env - the map that contains the specified environment variables.


CQueueConnectionFactory(CMap<mqstring,mqstring>& env) throw (CJMSException&);
Creates a new QueueConnectionFactory with the specified properties on the hashtable, without using JNDI lookup.
Parameters:

  • env - the map that contains the specified environment variables.

Methods

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

void setConnectionFactoryMetaData(CQueueConnectionFactoryMetaData metaData);*
Sets the Connection Factory Meta Data. Used only for common ConnectionFactory
Parameters:

  • metaData – The connection factory meta data to be set



CQueueConnection createQueueConnection(mqcstring userName, mqcstring password, mqcstring unifiedConnectionID)throw (FioranoException&);*
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
  • unifiedConnectionID - The connection id string.

Returns: CQueueConnection object
Exceptions: FioranoException
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
CConnectionFactoryMetaData getConnectionFactoryMetaData() const;*
Returns the Connection Factory Meta Data.
Parameters: None
Returns: CQueueConnection object
Exceptions: CJMSException

CMap<mqstring,mqstring>& getInitialContextEnvironment() const;
Returns the complete environment that was used to to lookup the owning connection factory.This api is used, when a connection created in a server less enviroment connects to the server when it becomes available.
Parameters: None
Returns: CQueueConnection object

CTopicConnectionFactory

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

Inheritance Hierarchy

CTopicConnectionFactory
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionFactoryBase, CQueueConnectionFactoryBase, CLookUpHelper
cppnativertl:: CTopic
cppnativertl:: CTopic





Subclasses

None

Constructors

CTopicConnectionFactory();
Default Constructor.
CTopicConnectionFactory (CConnectionFactoryMetaData tmd,* CMap<mqstring,mqstring>& env);
Creates a new TopicConnectionFactory with the specified metadata and with thespecified properties on the hashtable, without using JNDI lookup.
Parameters:

  • tmd – pointer to the TopicMetaData.
  • env - the map that contains the specified environment variables.


CTopicConnectionFactory (CMap<mqstring,mqstring>& env)throw (CJMSException&);
Creates a new QueueConnectionFactory with the specified properties on the hashtable, without using JNDI lookup.
Parameters:

  • env - the map that contains the specified environment variables.

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() 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
void setConnectionFactoryMetaData(CTopicConnectionFactoryMetaData metaData);*
Sets the Connection Factory Meta Data. Used only for common ConnectionFactory
Parameters:

  • metaData – The connection factory meta data to be set

CConnectionFactoryMetaData getConnectionFactoryMetaData() const;*
Returns the Connection Factory Meta Data.
Parameters: None
Returns: CTopicConnection object
Exceptions: CJMSException
CMap<mqstring,mqstring>& getInitialContextEnvironment() const;Returns the complete environment that was used to to lookup the owning connection factory.This api is used, when a connection created in a server less enviroment connects to the server when it becomes available.
Parameters: None
Returns: CQueueConnection object

CConnectionBase

CConnectionBase is base class for all the different types of connection. It includes more generic functions used by them.

Subclasses

  • CMQAdminConnection
  • CQueueConnection
  • CTopicConnection

Methods

CConnectionFactoryMetaData getConnectionFactoryMetaData ();*
Returns pointer to ConnectionFactoryMetaData object associated with this connection
Returns: Pointer to ConnectionFactoryMetaData object
Parameters: None
mqstring getConnectionID() const ;
Returns the unique connectionID associated with this connection of the AdminConnection.
Returns: connectionID String
Parameters: None
mqboolean isAutoRevalidationEnabled();
Indicates whether the Auto Revalidation is enabled or not.
Returns: true/False indicating the status.
Parameters: None
mqboolean isConnected() const;
Returns a boolean indicating that the connection is in connected state or not.
Returns: true/False indicating the status.
Parameters: None
mqboolean isCSPEnabled() const;
Indicates whether the CSP (client Side Persistence) is enabled for this connection
Returns: true/False indicating the status.
Parameters: None
mqboolean isForcefullyKilled () const;
Indicates whether the connection is forcefully killed or not
Returns: true/False indicating the status.
Parameters: None
mqboolean isIgnoreMsgEnabled () const;
This method checks whether the client has provided a property that the publish message call should be ignored when the server goes down. 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' = 'IGNORE'.
Returns: true if the property 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' is set to 'IGNORE' , false otherwise.
Parameters: None
mqboolean isPublishBlockingEnabled () const;
This method checks whether the client has provided a property that the publish message call should be blocked when the server goes down. 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' = 'BLOCK'.
Returns: true if the property 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' is set to ''BLOCK' , false otherwise.
Parameters: None
mqboolean isThrowExceptionEnabled () const;
This method checks whether the client has provided a property that the publish message call should throw an exception when the server goes down. 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' = 'EXCEPTION'.
Returns: true if the property 'PUBLISH_BEHAVIOUR_IN_AUTO_REVALIDATION' is set to ''EXCEPTION', false otherwise.
Parameters: None
mqlong getAsyncSendBatchBufferSize() const;
Gets the AsyncSend Batch BufferSize
Returns: Async send buffer size as long
Parameters: None
mqlong getAsyncSendCompletionWaitTimeout() const;
Gets the AsyncSend CompletionWait Timeout.
Returns: AsyncSend CompletionWait Timeout
Parameters: None
mqbyte getPublisherBehaviourOnAsyncSendBufferOverflow() const;
Gets the PublisherBehaviour On AsyncSend Buffer Overflow
Returns: byte value representing the publishe Behaviour
It can be one o the following

  • THROWEXCEPTION = 0
  • IGNORE_EXCEPTION = 1
  • BLOCK =2

Parameters: None

CMQAdminConnection

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

CMQAdminConnection
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionBase
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

None

Methods

mqboolean getClosed();
Returns the status of the connection whether it is closed or not.
Returns: true/false indicates the status
Parameters: None
mqcstring getClientID() throw (CJMSException&);
Returns the clientID of the AdminConnection.
Returns: clientID String
Parameters: None
Exceptions: CJMSException
mqstring getCurrentConnectURL();
Returns the current URL using which the connection is made.
Returns: Url string
Parameters: None
CMQAdminService getMQAdminService() throw (FioranoException&);*
A CMQAdminService 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 CMQAdminService.
Parameters: None
Exceptions: FioranoException
CMQAdminConnectionFactory getParentConnectionFactory();*
Returns the parent connection factory for this admin connection.
Returns: CMQAdminConnectionFactory
Parameters: None
CExceptionListener getExceptionListener();*
Gets the ExceptionListener set for this Connection.
Returns: CExceptionListener
Parameters: None
mqcstring getConnectUrl() const;
This method returns the url to which FMQ client is currently connected.In case connection is not connected to the server, then it returns NULL. This function is same as getCurrentConnectURL().
Returns: Url String
Parameters: None
void setExceptionListener(CExceptionListener listener);*
Set's ExceptionListener callback. The call back will be invoked whenever an Exception occurs due to network failure or server down. A NULL argument destroys any existing ExceptionListener.
Returns: void
Parameters: listener - Exception listener to be set for the connection.
void close()throw (UnsuccessfulOperationException&, FioranoException&);
Closes the Admin connection with the FMQServer.
Returns: Void
Parameters: None
Exceptions: CJMSException

voidCConnection

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

Inheritance Hierarchy

None

Subclasses

  • CFioranoConnection
  • CQueueConnection
  • CTopicConnection

Methods

void close();
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
CJMSSession *createSession(const mqboolean transacted, const mqint acknowledgeMode) throw (CJMSException &);
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.
mqcstring getClientID();
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.
CExceptionListener *getExceptionListener();
Get a pointer to the exception listener that is registered with the connection.
Parameters: None
Returns: Pointer to the exception listener.
void setExceptionListener(CExceptionListener *exceptionListener);
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
void setClientID(mqcstring clientID);
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
void start();
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
void stop();
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

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

CQueueConnection
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionBase, CConnection, CQueueConnectionBase, CPoisonMessageConnection
cppnativertl:: CTopic
cppnativertl:: CTopic


Subclasses

None

Methods


This class contains the following additional methods in addition to the methods declared in CConnection.
CQueueSession createQueueSession(mqboolean transacted, mqint acknowledgeMode) throw (FioranoException&, IllegalStateException&);*
Creates a QueueSession 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: FioranoException, IllegalStateException
void setAdvisoryMessageListener(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

CTopicConnection
cppnativertl:: CTopic
cppnativertl:: CTopic
CConnectionBase, CConnection
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

None

Methods


This class contains the following additional methods in addition to the methods declared in CConnection.
CTopicSession *createTopicSession(const mqboolean transacted,const mqint acknowledgeMode) throw (IllegalStateException&, FioranoException&);
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(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

CFioranoSessionCTopicSessionCQueueSession CJMSSession



Subclasses

  • CTopicSession
  • CQueueSession
  • CFioranoSession

Methods

void close()throw (CJMSException &) ;
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
void commit();
Commit all messages in the current transaction only if the session is set as transacted.
Parameters: None
Returns: Void
Exceptions:
CQueueBrowser *createBrowser( CQueue *q) throw (CJMSException &);
Creates a CQueueBrowser object to look at the messages on the specified queue.
Parameters: CQueue object to access.
Returns: The CQueueBrowser object.
Exceptions: CJMSException
CQueueBrowser *createBrowser( CQueue *q, mqcstring messageSelector);
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.
CTopicSubscriber *createDurableSubscriber( CTopic *topic, mqcstring name)throw (CJMSException &);
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.
CTopicSubscriber *createDurableSubscriber( CTopic *topic, mqcstring name,mqcstring messageSelector, mqboolean noLocal);
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.
CMessageConsumer createConsumer(CDestination* destination)* throw (CJMSException &);
Creates a MessageConsumer for the specified destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a MessageConsumer.
Parameters:

  • destination - the non-temporary destination(topic) to subscribe to

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createConsumer(CDestination* destination,* mqcstring messageSelector)throw (CJMSException &);
Creates a MessageConsumer for the specified destination. 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 sent to a destination.
Parameters:

  • destination - the non-temporary destination(topic) 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.

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createConsumer(CDestination* destination,* mqcstring messageSelector, const mqboolean noLocal) throw (CJMSException &) ;
Creates a MessageConsumer for the specified destination. 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 sent to a destination.
Parameters:

  • destination - the non-temporary destination(topic) 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: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createDurableConsumer(CTopic* topic, mqcstring name)* throw (CJMSException &) ;
Creates an unshared durable subscription on the specified topic (if one does not already exist) and creates a consumer on that durable subscription. This method creates the durable subscription without a message selector and with a noLocal value of false.
Parameters:
Parameters:

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

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createDurableConsumer(CTopic* topic,* mqcstring name, mqcstring messageSelector, const mqboolean noLocal) throw (CJMSException &) ;
Creates an unshared durable subscription on the specified topic (if one does not already exist), specifying a message selector and the noLocal parameter, and creates a consumer on that durable subscription.
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 CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createSharedDurableConsumer(CTopic* topic, mqcstring name) throw (CJMSException &) ;*
Creates a shared durable subscription on the specified topic (if one does not already exist), specifying a message selector and the noLocal parameter, and creates a consumer on that durable subscription. This method creates the durable subscription without a message selector.
Parameters:

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

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createSharedDurableConsumer(CTopic* topic,* mqcstring name, mqcstring messageselector) throw (CJMSException &) ;
Creates a shared durable subscription on the specified topic (if one does not already exist), specifying a message selector, and creates a consumer on that durable subscription
Parameters:

  • topic - the non-temporary Topic to subscribe to
  • name - the name used to identify this shared 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.

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createSharedConsumer(CTopic* topic, mqcstring sharedSubscriptionName)* throw (CJMSException &) ;
Creates a shared non-durable subscription with the specified name on the specified topic (if one does not already exist) and creates a consumer on that subscription. This method creates the non-durable subscription without a message selector.
Parameters:

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

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMessageConsumer createSharedConsumer(CTopic* topic, mqcstring sharedSubscriptionName, mqcstring messageSelector) throw (CJMSException &) ;*
Creates a shared non-durable subscription with the specified name on the specified topic (if one does not already exist) specifying a message selector, and creates a consumer on that subscription.
Parameters:

  • topic - the non-temporary Topic to subscribe to
  • sharedSubscriptionName - the name used to identify this shared 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.

Returns: The CMessageConsumer Object.
Exceptions: CJMSException.
CMapMessage *createMapMessage();
Creates a Map Message.
Parameters: None
Returns: The CMapMessage Object.
CMessage *createMessage();
Creates a message that has no body.
Parameters: None
Returns: The CMessage Object.
CQueue *createQueue(mqcstring queueName) throw (CJMSException &);
Creates a Queue destination in the messaging server with the specified queueName as mqctsring.
Parameters:

  • queueName – name of the Queue (Destination) on the MQ Server.

Returns: The CQueue Object.
CStreamMessage *createStreamMessage();
Creates a CStreamMessage.
Parameters: None
Returns: The CStreamMessage Object.
CTemporaryQueue *createTemporaryQueue()throw (CJMSException &);
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.
CTemporaryTopic *createTemporaryTopic()throw (CJMSException &);
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.
CTextMessage *createTextMessage();
Creates a TextMessage with empty body.
Parameters: None
Returns: The CTextMessage Object.
CTextMessage *createTextMessage(mqcstring text);
Creates a TextMessage initialised with text provided.
Parameters:

  • text: message in the form of const char*

Returns: The CTextMessage Object.
CTopic *createTopic(mqcstring topicName);
Creates a Topic destination in the messaging server.
Parameters:

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

Returns: The CTopic Object.

CMessageListener *getMessageListener();
Returns the session's distinguished message listener.
Parameters: None
Returns: The CMessageListener Object.

mqboolean getTransacted()throw (CJMSException&);
Indicates whether the session is transacted or not.
Parameters: None
Returns:

  • 1 – Transacted
  • 0: Non-Transacted.

Exceptions: CJMSException.
void recover();
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
void rollback();
Rolls back any messages done in this transaction. The Session must be Transacted.
Parameters: None
Returns: Void
void setMessageListener( CMessageListener *messageListener);
Sets the session's distinguished message listener.
Parameters: messageListener
Returns: Void
void unsubscribe(mqcstring name);
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

CFioranoSession

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

Subclasses

None

Methods

CFioranoMessageConsumer *createConsumer(const CDestination *dest) const 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) const 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) const 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.

Subclasses

None

Methods


CQueueReceiver createReceiver(CQueue* queue) 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(CQueue* queue, mqstring messageSelector) 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(CQueue* queue) 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.

Subclasses

None

Methods


CTopicPublisher createPublisher(CTopic* topic) throw (InvalidDestinationException&, IllegalStateException&, 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(CTopic* topic) 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(CTopic* topic, mqstring messageSelector, mqboolean noLocal) throw (InvalidDestinationException&, IllegalStateException&, 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.
CTopicSubscriber createDurableSubscriber(CTopic* topic, mqcstring name) throw (CJMSException&);*
Creates a durable subscriber to the specified topic. A client uses a TopicSubscriber object to receive messages that have been published to a topic. They receive only messages that are published while they are active.
Parameters:

  • topic – Topic destination to subscribe to
  • name : Durable subscriber identifier.

Returns: CTopicSubscriber
Exceptions: CJMSException.

CTopicSubscriber createDurableSubscriber(CTopic* topic, mqcstring subscriberID,*
mqcstring messageSelector,mqboolean noLocal) throw (InvalidDestinationException&, IllegalOperationException, CJMSException&);
Creates a durable 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.
Parameters:

  • topic – Topic destination to subscribe to
  • subscriberID – Durable Subscriber identifier
  • 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: InvalidDestinationException , IllegalOperationException , 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




CMessageProducer
cppnativertl:: CTopic
cppnativertl:: CTopic
CCloseable
cppnativertl:: CTopic
cppnativertl:: CTopic


Subclasses

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

  • CQueueSender
  • CTopicPublisher
  • CFioranoMessageProducer

Methods


mqint getDeliveryMode() throw (CJMSException&);
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
CDestination *getDestination()throw (CJMSException&);
Parameters: None
Returns: This producer's destination.
Exceptions: CJMSException
mqboolean getDisableMessageTimestamp()throw (CJMSException&);
Gets an indication of whether message timestamps are disabled.
Parameters: None
Returns: An indication of whether message timestamps are disabled
Exceptions: CJMSException
mqboolean getDisableMessageID()throw (CJMSException&);
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
mqint getPriority()throw (CJMSException&);
Gets the producer's default priority.
Parameters: None
Returns: The message priority for this message producer
Exceptions: CJMSException
mqlong getTimeToLive() throw (CJMSException&);
mqlong getTimeToLive() const throw (CJMSException&);
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
void setDeliveryMode(mqint deliveryMode)throw (CJMSException&);
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
void setDisableMessageID(mqboolean value) throw (CJMSException&);
Sets whether message IDs are disabled. Disabled for FioranoMQ by default.
Parameters:

  • value: indicates if message IDs are disabled

Returns: Void
Exceptions: CJMSException
void setDisableMessageTimestamp(mqboolean value)throw (CJMSException&);
Sets whether message timestamps are disabled.
Parameters:

  • value: indicates if message timestamps are disabled

Returns: Void
Exceptions: CJMSException
void setPriority(mqint defaultPriority)throw (CJMSException&);
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
void setTimeToLive(mqlong timeToLive)throw (CJMSException&);
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
void send(CDestination *dest, CMessage *msg)throw (CJMSException&);
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
void send(CDestination *dest, CMessage *msg, mqint deliveryMode,
mqint priority, mqlong timeToLive) throw (CJMSException&);
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
void send(CMessage *msg) throw (CJMSException&);
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
void send(CMessage *msg,mqint deliveryMode, mqint priority,
mqlong timeToLive) throw (CJMSException&);
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

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

CQueueSender
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessageProducer
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Methods

(CQueueSender defines all the methods in CMessageProducer class, with the following additional APIs)
CQueue getQueue()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

CTopicPublisher
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessageProducer
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Methods

CTopic getTopic()throw (CJMSException&);*
Parameters: None
Returns: CTopic
Exceptions: CJMSException
(CTopicPublisher defines all the methods in CMessageProducer class, with the following additional APIs)

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) 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) 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) 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) 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


CMessageListener getMessageListener() const throw (CJMSException&);*
Gets the message consumer's MessageListener.
Parameters: None
Returns: The listener for the consumer
Exceptions: CJMSException
mqstring getMessageSelector() const throw (CJMSException&);
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
void setMessageListener( CMessageListener *messageListener);
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
CMessage *receive()throw (CJMSException&);
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
CMessage *receive(mqlong timeout) throw (CJMSException&);
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
CMessage *receiveNoWait()throw (CJMSException&);
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

CQueueReceiver

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

Inheritance Hierarchy

CQueueReceiver
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessageConsumer
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Methods

(CQueueReceiver defines all the methods in CMessageConsumer class, with the following additional APIs)
CQueue getQueue()const 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

CTopicSubscriber
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessageConsumer
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Methods

mqboolean getNoLocal() 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
(CTopicSubscriber defines all the methods in CMessageConsumer class, with the following additional APIs)

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

Subclasses

None

Constructors

CTopicMetaData();
Default Constructor.

Methods

mqbyte getType();
Returns the type of the metadata object.
Parameters: None
Returns: byte representing the type of the metadata object.
mqbyte getStorageType();
Gets the storage type for the topic. Storage type could be FILE_BASED_DATABASE or RDBMS_BASED_DATABASE.
Parameters: None
Returns: byte representing the storage type

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

Subclasses

None

Constructors

CQueueMetaData();
Default Constructor.

Methods

mqbyte getType();
Returns the type of the metadata object.
Parameters: None
Returns: byte representing the type of the metadata object.

mqbyte getStorageType();
Gets the storage type for the queue. Storage type could be FILE_BASED_DATABASE or RDBMS_BASED_DATABASE.
Parameters: None
Returns: byte representing the storage type

CDestination

A CDestination object encapsulates a provider-specific address.

Inheritance Hierarchy

None

Subclasses

Base class for:

  • CTopic
  • CQueue

Constructors

CDestination();
Default constructor.

Methods


void setName(mqcstring name);
Sets the destination name.
Parameters: name - The name of the destination to be set.
Returns: void
mqcstring getName()const;
Returns the destination name.
Parameters: none.
Returns: mqcstring represents the name of the destination

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

CLookupHelper, CDestinationCQueue
cppnativertl:: CTopic
cppnativertl:: CTopic




Subclasses

Base class for:

  • CTemporaryQueue

Constructors

CQueue();
Default Constructor,
CQueue(CQueueMetaData metadata)* Creates a new Queue with the specified metadata. Parameters:
metadata - MetaData for the Queue to be created

Methods

mqstring getQueueName();
Return the Queue Name
Parameters: None
Returns: Name of the queue
CQueueMetaData getMetaData();*
Returns meta data for object
Parameters: None
Returns: CQueueMetaData object of the queue

mqstring getDescription();
Returns the description of the Administered Object
Parameters: None
Returns: Description of the queue
mqstring getStorageURL();
Get the URL of the persistent storage.
Parameters: None
Returns:
mqboolean isTemporary();
Checks whether the queue is a temporary queue
Parameters: None
Returns: boolean indicates whether the queue is temporary or not
mqboolean isEncrypted();
Tells whether the encryption is turned on the queue
Parameters: None
Returns: boolean indicates whether the queue is encrypted or not

mqbyte getType();
Returns type for object
Parameters: None
Returns: byte representing the type of the object. For queue's this api will return 101.
mqboolean getCompressionEnabled();
Gets the compression enabled property.Returns true if message compression is enabled on this queue and false if message compression is disabled.
Parameters: None
Returns: boolean indicates whether compression is enabled or not

std::vector<mqstring> getListOfPermissions();
Returns list of permissions for object
Parameters: None
Returns: std::vector<mqstring>
void setName(mqcstring strName);
Set the Name of this MetaData Object
Parameters: strName – Name of the metaData
Returns: void
void setDescription(mqstring strDescription);
Set the description of the MetaData Object
Parameters: strDescription – Description of the Metadata
Returns: void
void setStorageURL(mqstring strStorageURL) throw (CJMSException&);
Sets the storageURL of this MetaData Object
Parameters: strStorageURL - storageURL of the MetaData Object
Returns: void
Exceptions: CJMSException
void setTemporary(mqboolean bIsTemporary);
Set true if this is a Temporary queue
Parameters: bIsTemporary – Boolean indicates whether this queue is temporary or not
Returns: void
Exceptions: CJMSException


mqstring toString();
Returns the mqstring representation of queue name.
Parameters: None
Returns: mqstring
mqboolean isActive();
Get state of this queue.
Parameters: None
Returns: boolean indicates whether the queue is in active state or not


void setActive(mqboolean state);
Set the state of the Destination to indicate whether the destination is active or NOT.
Parameters: state – indicates whether the destination is active or not
Returns: void

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

CLookupHelper, CDestinationCTopic
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

Base class for:

  • CTemporaryTopic

Constructors


CTopic();
Default Constructor.
CTopic(CTopicMetaData metadata) throw (CJMSException&);*
Create a Topic Destination with the specified MetaData
Parameters: metadata – Topic meta data.
Exceptions: CJMSException

Methods

mqstring getTopicName();
Return the topic Name
Parameters: None
Returns: Name of the Topic
CTopicMetaData getMetaData();*
Returns meta data for object
Parameters: None
Returns: CTopicMetaData
mqstring getDescription();
Returns the description of the Administered Object
Parameters: None
Returns: Description of the topic
mqstring getStorageURL();
Get the URL of the persistent storage.
Parameters: None
Returns: Url of the persistent storage
mqboolean isTemporary();
Checks whether the topic is a temporary topic
Parameters: None
Returns:boolean indicates whether the topic is temporary or not
mqboolean isEncrypted();
Tells whether the encryption is turned on the Topic
Parameters: None
Returns: boolean indicates whether encryption is enabled or not
mqbyte getType();
Returns type for object
Parameters: None
Returns: byte representing the type of the object. For topic's this api will return 100.

mqboolean getCompressionEnabled();
Gets the compression enabled property.Returns true if message compression is enabled on this topic and false if message compression is disabled.
Parameters: None
Returns: boolean indicates whether compression is enabled or not


std::vector<mqstring> getListOfPermissions();
Returns list of permissions for object
Parameters: None
Returns: std::vector<mqstring>
void setName(mqcstring strName);
Set the Name of this MetaData Object
Parameters: strName – Name of the metaData
Returns: void
void setDescription(mqstring strDescription);
Set the description of the MetaData Object
Parameters: strDescription – Description of the Metadata
Returns: void
void setStorageURL(mqstring strStorageURL) throw (CJMSException&);
Set the Name of this MetaData Object
Parameters: strStorageURL - storageURL of the MetaData Object
Returns: void
Exceptions: CJMSException
void setTemporary(mqboolean bIsTemporary);
Set true if this is a Temporary Topic
Parameters: bIsTemporary – Boolean indicates whether this queue is temporary or not
Returns: void
Exceptions: CJMSException




mqboolean hasHierarchialTopicSet();
Return true to indicate that this topic name as "*" in it.
Parameters: None
Returns: boolean indicates whether hierarchicalTopic is set or not.

mqstring toString();
Returns the mqstring representation of topic name.
Parameters: None
Returns: mqstring
mqboolean isActive();
Get state of this Topic.
Parameters: None
Returns: boolean indicates whether the queue is in active state or not


void setActive(mqboolean state);
Set the state of the Destination to indicate whether the destination is active or NOT.
Parameters: state – indicates whether the destination is active or not
Returns: void

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

CQueueCTemporaryQueue
cppnativertl:: CTopic
cppnativertl:: CTopic



Subclasses

None

Constructors

CTemporaryQueue(CQueueMetaData * metadata) throw (FioranoException&);
Creates a new temporary queue with the specified meta data.
Parameters:

  • metadata – Queue metadata instance.

Methods



void _delete() 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




CTopicCTemporaryTopic
cppnativertl:: CTopic
cppnativertl:: CTopic

Subclasses

None

Constructors

CTemporaryTopic(CTopicMetaData metadata) throw (FioranoException&);*
Creates a new temporary topic with the specified meta data.
Parameters:

  • metadata – Topic metadata instance.

 

Methods


void _delete() 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

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

CLargeMessage, CFioranoRecoverable, CFioranoMessage, CMessageHeaderCMessage
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

Base class for:

  • CTextMessage
  • CBytesMessage
  • CMapMessage
  • CStreamMessage

Constructors


CMessage();
Default Constructor.
CMessage(mqboolean largeUTFSupported);
Creates a new CMessage object with the given largeUTF support.
Parameters: largeUTFSupported – Boolean indicates largeUTF is supported or not
CMessage(mqint messageType, mqboolean largeUTFSupported);
Creates a new CMessage object with the given message type and largeUTF support.
Parameters:
largeUTFSupported – Boolean indicates largeUTF is supported or not
messageType – type of the message, it can be one of the following

  • CFioranoMessageConstants::BytesMessage - 1
  • CFioranoMessageConstants::MapMessage - 2
  • CFioranoMessageConstants::TextMessage - 3
  • CFioranoMessageConstants::ObjectMessage - 4
  • CFioranoMessageConstants::StreamMessage - 5
  • CFioranoMessageConstants::XMLMessage - 6
  • CFioranoMessageConstants::Message - 7

Note: XMLMessage and ObjectMesage types are currently not supported in NativeC++Rtl.
CMessage(CMessage msg)* throw (CloneNotSupportedException&);
Creates a new copy of the given CMessage. Copy constructor.
Parameters: msg – Message object which is to be copied.

Methods


mqcstring getActualDestination() const 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: mqcstring
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
mqboolean getBooleanProperty(mqcstring name) const 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) const 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) const throw (CJMSException &)
Returns the value of the double property with the specified name.
Parameters:

  • name: The name of the double property

Returns: 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)const 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) const 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() const 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
mqint getNumberOfProperties() const;
Returns the number of properties asspciated with this message.
Parameters: None
Returns: The number of properties
mqcstring getJMSCorrelationIDAsBytes() const 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: CJMSExceptionT getObjectProperty(mqcstring name, const T valType)
throw (CJMSException&);
Returns the value of the object property with the specified name and type.
Parameters:

  • name: The name of the object property

Returns: The object property value for the specified name
Exceptions: CJMSException
Example: getObjectProperty("Name",(int)5) will return an integer value associated with the property name "Name".
mqint getJMSDeliveryMode() const throw (CJMSException &);
Gets the DeliveryMode value specified for this message.
Parameters: None
Returns: The delivery mode for this message
Exceptions: CJMSException
CDestination *getJMSDestination() constthrow (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() constthrow (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() const throw (CJMSException &)
Gets the message ID. The JMSMessageID header field contains a value that uniquely identifies each 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() const 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() const 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() const 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() const 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() constthrow (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) const throw (CJMSException &)
Returns the value of the long property with the specified name.
Parameters:

  • propName: The name of the long property

Returns: 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.
std::vector<mqstring> getPropertyNames() const throw (CJMSException &)
Returns a vectorof the property names from the message object
Parameters: None
Returns: A vector of the property names.
Note: The vector contains all the the property names present in the received message .The Property's can be retrieved from the vector by iterating the vector.
Exceptions: CJMSException
If the JMS provider fails to get the property value due to some internal error.
mqshort getShortProperty(mqcstring propName) const 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) const throw (CJMSException &)
Returns the value of the String property with the specified name.
Parameters:

  • PropName: The name of the String property

Returns: 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.
mqint getMessageType() const 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) const 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 to

Returns: 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 message

Returns: 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 time

Returns: 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 message

Returns: 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 message

Exceptions: 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 message

Returns: 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 type

Returns: 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 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() const throw (CJMSException &)
Gets the isDiscardable value specified for this message.
Parameters: None
Returns:

  • mqboolean: the Discardable value for this message

Exceptions: CJMSException
If 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

CTextMessage
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessage
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Constructors

CTextMessage();
Default constructor.
CTextMessage(mqboolean largeUTFSupported);
Creates a new CTextMessage object with the given largeUTF support.
Parameters: largeUTFSupported – Boolean indicates largeUTF is supported or not
CTextMessage(mqint messageType, mqboolean largeUTFSupported) ;
Construct Text Message for the given message Type.
CTextMessage(CTextMessage msg)*
throw (CloneNotSupportedException&);
Creates a new copy of the given CTextMessage. Copy constructor.
Parameters: msg – Message object which is to be copied.
Exceptions: CloneNotSupportedException

Methods


mqstring getText() throw (CJMSException&);
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(mqstring string) throw (CJMSException&);
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.

CBytesMessage

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


CBytesMessage
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessage
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Constructors


CBytesMessage();
Default Constructor.
CBytesMessage(mqboolean largeUTFSupported);
Creates a new CBytesMessage object with the given largeUTF support.
Parameters: largeUTFSupported – Boolean indicates largeUTF is supported or not
CBytesMessage(CBytesMessage msg) throw (CloneNotSupportedException&);*
Creates a new copy of the given CBytesMessage. Copy constructor.
Parameters: msg – Message object which is to be copied.
Exceptions: CloneNotSupportedException

Methods


mqlong getBodyLength() 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() 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()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(mqchar value, mqint length) 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() 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() 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() 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() 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() 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() 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() 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() 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.
mqstring readUTF() 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 (FioranoException&);
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 (MessageNotWriteableException&, FioranoException&);
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 writeBytes(mqchar value, mqint offset, mqint length) throw (MessageNotWriteableException&, FioranoException&);*
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 (MessageNotWriteableException&, FioranoException&);
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 (MessageNotWriteableException&, FioranoException&);
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 (MessageNotWriteableException&, FioranoException&);
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 (MessageNotWriteableException&, FioranoException&);
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 (MessageNotWriteableException&, FioranoException&);
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(short value) throw (MessageNotWriteableException&, FioranoException&);
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(mqstring value) throw (MessageNotWriteableException&, FioranoException&);
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

Constructors

CMapMessage();
Default constructor.
CMapMessage(mqboolean largeUTFSupported);

Creates a new CMapMessage object with the given largeUTF support.
Parameters: largeUTFSupported – Boolean indicates largeUTF is supported or not
CMapMessage(CMapMessage msg) throw (CloneNotSupportedException&);*
Creates a new copy of the given CMapMessage. Copy constructor.
Parameters: msg – Message object which is to be copied.
Exceptions: CloneNotSupportedException

Methods


mqboolean getBoolean(mqstring name) throw (CJMSException&);
Returns the boolean value with the specified name.
Parameters:

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the byte value with the specified name.
Parameters:

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the Unicode character value with the specified name.
Parameters

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the double value with the specified name.
Parameters

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the float value with the specified name.
Parameters

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the int value with the specified name.
Parameters

  • Name: The 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(mqstring name) throw (CJMSException&);
Returns the long value with the specified name.
Parameters

  • Name: The 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.

mqshort getShort(mqstring name) throw (CJMSException&);
Returns the short value with the specified name.
Parameters

  • Name: The 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.
mqstring getString(mqstring name) 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.
void setBoolean(mqstring name, 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(mqstring name, 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(mqstring name, mqchar 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 setChar(mqstring name, 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: CJMSException
If the JMS provider fails to write the message due to some internal error.
void setDouble(mqstring name, 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(mqstring name, 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(mqstring name, 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(mqstring name, 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(mqstring name, 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(mqstring name, mqstring 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


CStreamMessage
cppnativertl:: CTopic
cppnativertl:: CTopic
CMessage
cppnativertl:: CTopic
cppnativertl:: CTopic

 

Subclasses

None

Constructors

CStreamMessage();
Default Constructor.
CStreamMessage(mqboolean largeUTFSupported);
Creates a new CStreamMessage object with the given largeUTF support.
Parameters: largeUTFSupported – Boolean indicates largeUTF is supported or not
CStreamMessage(CStreamMessage msg) throw (CloneNotSupportedException&);*
Creates a new copy of the given CStreamMessage. Copy constructor.
Parameters: msg – Message object which is to be copied.
Exceptions: CloneNotSupportedException

Methods


mqboolean readBoolean()throw (MessageFormatException&, 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() throw (MessageFormatException&, 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(mqchar value, mqint length) 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() 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() 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() 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() 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() 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() 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.

mqstring readString()throw (CJMSException&);
Reads a String from the stream message.
Parameters: None
Returns: A mqcstring(cost std::string) 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 (FioranoException&);
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(mqchar value, mqint length)throw (CJMSException&);*
Writes a byte array field to the stream message. The byte array value is written to themessage 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(mqchar 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.
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 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(mqstring 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

Methods


mqboolean disconnectClient(mqstring clientID)throw (FioranoException&);
Disconnects the client with the specified client identifier.
Parameters: clientID - the identifier of the client to be disconnected.
Returns: mqboolean
Exceptions: FioranoException
mqboolean disconnectClientWithToken(mqint connToken)throw (FioranoException&);
Disconnects the client with the specified connection token.
Parameters: connToken - the connection token of the client to be disconnected.
Returns: mqboolean
Exceptions: FioranoException
mqint getNoOfActiveClientConnections()throw (ResourceClosedException&, FioranoException&);
Gets the number of active client connections to the MQ Server.
Parameters: None
Returns: mqint
Exceptions: FioranoException
std::vector<mqstring> listActiveClientConnections()throw (ResourceClosedException&, FioranoException&);
Returns an vector of active client connections to the MQ Server.
Parameters: None
Returns: Vector of active client connections.
Exceptions: FioranoException
std::vector<mqstring> getDurableSubscribersForTopic(mqstring topicName)throw (FioranoException&);
Returns a vector of all the subscriber names on the specified topic.
Parameters: topicName - The topic name.
Returns: vector of all the subscriber names on the specified topic.
Note: The vector contains all the durable subscriber names for the topic.The names can be retrieved by iterating the vector.
Exceptions: FioranoException
std::vector<mqstring> getDurableSubscriberClientIDs()throw (FioranoException&);
Returns a vector of all durable subscriber client ids which are both in active and passive states.
Parameters: None
Returns: vector of all the durable subscriber client ids.
Note: The vector contains all the durable subscriber client ID's for the topic.The ID's can be retrieved by iterating the vector.
Exceptions: FioranoException
std::vector<mqstring> getPTPClientIDs()throw (FioranoException&);
Returns a vector of all client ids for PTP (Point to Point JMS model).
Parameters: None
Returns: vector of all the client ids on PTP.
Note: The vector contains all the PTP client ID's for the topic.The ID's can be retrieved by iterating the vector.
Exceptions: FioranoException
std::vector<mqstring> getPubSubClientIDs()throw (FioranoException&);
Returns a vector of all client ids for PubSub (Publish / Subscribe JMS model).
Parameters: None
Returns: vector of all the client ids on PubSub.
Exceptions: FioranoException
Note: The vector contains all the PUBSUB client ID's for the topic.The ID's can be retrieved from the vector by iterating the vector.
std::vector<mqstring> getSubscriberIDs(mqstring clientID)throw (FioranoException&);
Returns a vector of all subscriber ids on the specified client id.
Parameters: clientID -String representing the client id.
Returns: vector of all the Subscriber ids on the specified client id.
Note: The vector contains all the Subscriber ID's for the topic.The ID's can be retrieved from the vector by iterating the vector.
Exceptions: FioranoException
mqstring getSubscriptionTopicName(mqstring clientID, mqstring subscriberID) throw (FioranoException&);
Returns a mqstring 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: FioranoException
mqlong getNumberOfDeliverableMessages(mqstring queueName)throw (FioranoException&);
Returns a mqlong object for the number of deliverable messages on the specified queue.
Parameters:

  • queueName - String representing the queue name.

Returns: mqlong object for the number of deliverable messages on the specified queue.
Exceptions: FioranoException
mqlong getNumberOfDeliverableMessages(mqstring clientID, mqstring subscriberID)throw (FioranoException&);
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: mqlong object for the number of deliverable messages on the specified clientID and subscriberID combo.
Exceptions: FioranoException
mqlong getNumberOfUndeletedMessages(mqstring queueName)throw (FioranoException&);
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: Returns a mqlong object for the number of undeleted messages on the server for the specified queueName.
Exceptions: FioranoException
void unsubscribe(mqstring clientID, mqstring subscriberID)throw (FioranoException&);
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: void.
Exceptions: FioranoException
void purgeSubscriptionMessages(mqstring clientID, mqstring subscriberID)throw (FioranoException&);
Purge all messages for a durable subscriber for the specified clientID and subscriberID combination.
Parameters:

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

Returns: void.
Exceptions: FioranoException
void createTopic(CTopicMetaData metaData)throw (FioranoException&);*
Creates a topic with the specified topic meta-data on the MQ Server.
Parameters:

  • topicMetaData – pointer to CTopicMetaData object.

Returns: void.
Exceptions: FioranoException
void createQueue(CQueueMetaData metaData)throw (FioranoException&);*
Creates a queue with the specified queue meta data on the MQ Server.
Parameters:

  • queueMetaData – pointer to CQueueMetaData object.

Returns: void.
Exceptions: FioranoException
void deleteTopic(mqstring name)throw (FioranoException&);
Delete a topic with the specified topic name.
Parameters:

  • topicName - String representing the topic name.

Returns: void.
Exceptions: FioranoException
void deleteQueue(mqstring name)throw (FioranoException&);
Delete a queue with the specified queue name.
Parameters:

  • queueName - String representing the queue name.

Returns: void.
Exceptions: FioranoException
void deleteTopicConnectionFactory(mqstring name)throw (FioranoException&);
Delete a topicConnectionFactory with the specified topicConnectionFactory name.
Parameters:

  • tcfName - String representing the topic connection factory name.

Returns: void.
Exceptions: FioranoException
void deleteQueueConnectionFactory(mqstring name)throw (FioranoException&);
Delete a queueConnectionFactory with the specified queueConnectionFactory name.
Parameters:

  • qcfName - String representing the queue connection factory name.

Returns: void
Exceptions: FioranoException
void deleteAdminConnectionFactory(mqstring name)throw (FioranoException&);
Delete a adminConnectionFactory with the specified adminConnectionFactory name.
Parameters:

  • acfName -String representing the admin connection factory name.

Returns: void.
Exceptions: FioranoException
void createTopicConnectionFactory(CTopicConnectionFactoryMetaData metaData) throw (FioranoException&);*
Creates a topicConnectionFactory with the specified topicConnectionFactory meta data on the MQ Server.
Parameters:

  • tcfMetaData – pointer to CTopicConnectionFactoryMetaData object.

Returns: void.
Exceptions: CJMSException
void createQueueConnectionFactory(CQueueConnectionFactoryMetaData metaData) throw (FioranoException&);*
Creates a queueConnectionFactory with the specified queueConnectionFactory meta data on the MQ Server.
Parameters:

  • qcfMetaData – pointer to CQueueConnectionFactoryMetaData object.

Returns: void.
Exceptions: FioranoException
void createAdminConnectionFactory(CAdminConnectionFactoryMetaData metaData) throw (FioranoException&);*
Creates a adminConnectionFactory with the specified adminConnectionFactory meta data on the MQ Server.
Parameters:

  • acfMetaData – pointer to CAdminConnectionFactoryMetaData object.

Returns: void.
Exceptions: FioranoException
std::vector<mqstring> currentUsers() throw (FioranoException&);
Returns a vector of all the current users on the MQ Server.
Parameters: None
Returns: Vector of all the current users on the MQ Server.
Note: The vector contains all the current users.The users can be retrieved by iterating through the vector.
Exceptions: FioranoException
void restartServer()throw (FioranoException&);
Restarts the MQ Server.
Parameters: None
Returns: void.
Exceptions: FioranoException
void shutdownServer()throw (FioranoException&);
Shuts down the MQ Server.
Parameters: None
Returns: void.
Exceptions: FioranoException
void shutDownActiveHAServer() throw (FioranoException&);
Shuts down the Active HA MQ Server.
Parameters: None
Returns: void.
Exceptions: FioranoException
void shutDownPassiveHAServer()throw (FioranoException&);
Shuts down the Passive HA MQ Server.
Parameters: None
Returns: void.
Exceptions: FioranoException
void purgeQueueMessages(mqstring queueName, mqboolean forcefully)throw (FioranoException&);
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: void.
Exceptions: FioranoException
void purgeQueueMessages(mqstring queueName)throw (FioranoException&);
Purges all the messages on the specified queue, if no active consumer is present.
Parameters:

  • queueName - String representing the queue name.

Returns: void.
Exceptions: FioranoException
void showStatusOfAllQueues()throw (FioranoException&);
Shows the status of all the queues on the server.
Parameters: None
Returns: void.
Exceptions: FioranoException
mqint deleteMessagesOnQueue(mqstring queueName, mqlong startIndex, mqlong endIndex, mqint priority)throw (FioranoException&);
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: Mqint representing the number of messages deleted on the server.
Exceptions: FioranoException
void loadAdminObjects()throw (FioranoException&);
Load admin objects on the server.
Parameters: None
Returns: void.
Exceptions: FioranoException
mqboolean allowIpAddress(const mqstring ipAddress) throw (FioranoException&);
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: FioranoException
mqboolean allowIpAddress(const mqstring startIpAddress, const mqstring endIpAddress) throw (FioranoException&);
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: FioranoException
mqboolean removeIpFromTheList(const mqstring ipAddress) throw (FioranoException&);
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: FioranoException
mqboolean removeIpFromTheList(const mqstring startIpAddress, const mqstring endIpAddress) throw (FioranoException&);
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: FioranoException
std::vector<mqstring>allowIpAddress(std::set<mqstring> ipAddressList) throw (FioranoException&);
Returns a vector of all the failed ipAddress which cannot be added into the allowable ipAddress list
Parameters: ipAddressList – std:set which contains the list of Address to be added
Returns: vector of all the failed ipAddress.
Note: The vector contains all the failed ipAddresses.The ID's can be retrieved from the vector by iterating the vector.
Exceptions: FioranoException
std::vector<mqstring>removeIpFromTheList(std::set<mqstring> ipAddressList) throw (FioranoException&);
Returns a vector of all the failed ipAddress which cannot be removed from the allowable ipAddress list
Parameters: ipAddressList – std:set which contains the list of Address to be removed
Returns: vector of all the failed ipAddress.
Note: The vector contains all the failed ipAddresses.The ID's can be retrieved from the vector by iterating the vector.
Exceptions: FioranoException
std::set<mqstring>listAllAllowedIps() throw (FioranoException&);
Returns a set of all the allowed ipAddresses.
Parameters: None
Returns: set of all the allowed ipAddresses.
Note: The vector contains all the allowed ipAddresses.The ID's can be retrieved from the vector by iterating the vector.
Exceptions: FioranoException

CMap<K, V>

This class implements the map object which maps keys to values. Any non-null object can be used as a value and any non-null object can be used as a key. The use of CHashTable has been deprecated in the older RTL and is now replaced by CMap<K,V>.

Inheritance Hierarchy

CMap<K, V>
cppnativertl:: CTopic
cppnativertl:: CTopic
Map<K, V, Comparator>
cppnativertl:: CTopic
cppnativertl:: CTopic


Subclasses

None

Constructors

CMap();
Default Constructor
CMap( const CMap& source );
Copy constructor.Creates CMap object with the given Map.
Parameters: source - Map to be used to for initializing CMap instance.

Methods

mqboolean equals( const CMap& source ) const;
Checks if the source CMap and the given CMap are the same.
Parameters: None
Returns: Returns true if both CMaps are same.
void copy( const CMap& source );
Copies the specified CMap contents into the given CMap.
Parameters:
source - CMap which is to be copied.
Returns: void.
void clear();
Erases the contants of CMap.
Parameters: None
Returns: void.
mqboolean containsKey( const K& key ) const;
Checks if the CMap contains the specified key.
Parameters: None
key - The key to be checked in the CMap.
Returns: Returns true if the key is present, false otherwise.
mqboolean containsValue( const V& value ) const;
Checks if the CMap contains the specified value.
Parameters:
value - The value to be checked in the CMap.
Returns: Returns true if the value is present, false otherwise.
mqboolean isEmpty() const;
Checks if the CMap is empty or not.
Parameters: None
Returns: True if CMap is empty, false otherwise.
mqint size() const;
Returns the number of elements (Key, Value pair) in the CMap.
Parameters: None
Returns: Returns number of elements.
const V& get( const K& key ) const throw (Exception&);
Retrieves the value from the CMap for the specified key.
Parameters: key - The key entry whose value is to be fetched.
Returns: value
Exceptions: Exception is thrown if no such key is present in the CMap
void put( const K& key, const V& value );
Inserts the Key value pair into the CMap.
Parameters:

  • Key - Key of specified type.
  • Value - Key of specified type.

Returns: void.
void putAll( const CMap<K,V,COMPARATOR>& other );
Inserts all the entries in the given CMap into this CMap.
Parameters: other - CMap to be inserted.
Returns: void.
V remove( const K& key ) throw (Exception&);
Removes an entry from the CMap based on the specified key.
Parameters: key - the CMap entry to be removed.
Returns: The value removed from the CMap.
Exceptions: Exception is thrown if no such key is present in the CMap
std::vector<K> keySet() const;
Retrieves the entire list of keys from the given CMap.
Parameters: None
Returns: Returns a vector of keys.
std::vector<V> values() const;
Returns the values present in the CMap as a std::vector.
Parameters: None
Returns: Returns a vector of values.

JMSContext

A JMSContext is the main interface in the simplified JMS API introduced for JMS 2.0.This combines in a single object the functionality of two separate objects from the JMS 1.1 API: a Connection and a Session.

Inheritance Hierarchy


JMSContextCClosable, CStartable, CStoppable

Subclasses

FioranoJMSContext

Methods

void acknowledge() throw (JMSRuntimeException&);
Acknowledges all messages consumed by the JMSContext's session.
Parameters : none
Returns : JMSConsumer's MessageListener, or null if one was not set
Exceptions :

    • JMSRuntimeException - if the JMS fails to acknowledge the messages due to some internal error
    • IllegalStateRuntimeException - if the JMSContext is closed.

void close() throw (JMSRuntimeException&);
Closes the JMSContext. This closes the underlying session and any underlying producers and consumers. If there are no other active (not closed) JMSContext objects using the underlying connection then this method also closes the underlying connection.
Parameter : return
Returns : the JMSConsumer's MessageListener, or null if one was not set
Exceptions:

    • JMSRuntimeException - if the JMS fails to close the JMSContext due to some internal error.
    • IllegalStateRuntimeException -if this method has been called by a MessageListener or CompletionListener on its own JMSContext

void commit() throw (JMSRuntimeException&) ;
Commits all messages done in this transaction and releases any locks currently held.
Parameter : None
Returns : None
Exceptions:

  • JMSRuntimeException - if the JMS fails to commit the transaction due to some internal error
  • TransactionRolledBackRuntimeException - if the transaction is rolled back due to some internal error during commit.
  • IllegalStateRuntimeException on 2 case
    1. if the JMSContext's session is not using a local transaction
    2. if this method has been called by a CompletionListener callback method on its own JMSContext

CQueueBrowser createBrowser(CQueue* queue)throw (JMSRuntimeException&) ;*
Creates a QueueBrowser object to peek at the messages on the specified queue.
Parameters: queue - the queue to access
return: newly created CqueueBrowser
Exceptions:

  • JMSRuntimeException - if the session fails to create a browser due to some internal error.
  • InvalidDestinationRuntimeException - if an invalid destination is specified

JMSConsumer createConsumer(CDestination* destination,mqcstring messageSelector,const mqboolean noLocal)throw (JMSRuntimeException&);*
Creates a JMSConsumer for the specified destination, specifying a message selector and the noLocal parameter. A client uses a JMSConsumer object to receive messages that have been sent to a destination. The noLocal argument is for use when the destination is a topic and the JMSContext's connection is also being used to publish messages to that topic. If noLocal is set to true then the JMSConsumer will not receive messages published to the topic by its own connection. The default value of this argument is false. If the destination is a queue then the effect of setting noLocal to true is not specified.
Parameters:

  • destination - the 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 JMSConsumer.
  • noLocal - if true, and the destination is a topic, then the JMSConsumer will not receive messages published to the topic by its own connection

Returns : newly created JMSConsumer
Exceptions:

  • JMSRuntimeException - if the session fails to create a JMSConsumer due to some internal error.
  • InvalidDestinationRuntimeException - if an invalid destination is specified.
  • InvalidSelectorRuntimeException - if the message selector is invalid.

CQueueBrowser createBrowser(CQueue* queue, mqcstring messageSelector) throw (JMSRuntimeException&);*
Creates a QueueBrowser object to peek at the messages on the specified queue using a message selector.
Parameters:

    • queue - the queue 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:
Newly created CQueueBrowser
Exceptions:

  • JMSRuntimeException - if the session fails to create a browser due to some internal error.
  • InvalidDestinationRuntimeException - if an invalid destination is specified

CBytesMessage createBytesMessage() throw (JMSRuntimeException&) ;*
Creates a BytesMessage object. A BytesMessage object is used to send a message containing a stream of uninterpreted bytes.
Parameters : None
Returns : newly created CBytesMessage
Exceptions: JMSRuntimeException - if the JMS fails to create this message due to some internal error.
JMSConsumer createConsumer(CDestination* destination) throw (JMSRuntimeException&) ;*
Creates a JMSConsumer for the specified destination. A client uses a JMSConsumer object to receive messages that have been sent to a destination.
Parameters: destination - the Destination to access.
Returns : newly created JMSConsumer
Exceptions:

  • JMSRuntimeException - if the session fails to create a JMSConsumer due to some internal error.
  • InvalidDestinationRuntimeException - if an invalid destination is specified.

JMSConsumer createConsumer(CDestination* destination, mqcstring messageSelector) throw (JMSRuntimeException&);*
Creates a JMSConsumer for the specified destination, using a message selector. A client uses a JMSConsumer object to receive messages that have been sent to a destination.
Parameters :

  • destination - the 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 JMSConsumer.

Returns : newly created JMSConsumer
Exceptions:

    • JMSRuntimeException - if the session fails to create a JMSConsumer due to some internal error.
    • InvalidDestinationRuntimeException - if an invalid destination is specified.
    • InvalidSelectorRuntimeException - if the message selector is invalid.

JMSContext createContext(const mqint sessionMode) throw (JMSRuntimeException&);*
Creates a new JMSContext with the specified session mode using the same connection as this JMSContext and creating a new session.
Parameters :

  • sessionMode - indicates which of four possible session modes will be used. The permitted values are JMSContext::SESSION_TRANSACTED, JMSContext::CLIENT_ACKNOWLEDGE, JMSContext::AUTO_ACKNOWLEDGE and JMSContext::DUPS_OK_ACKNOWLEDGE.

Return: a newly created JMSContext
Exceptions: JMSRuntimeException - if the JMS fails to create the JMSContext due to some internal error
JMSConsumer createDurableConsumer(CTopic* topic,mqcstring name)throw (JMSRuntimeException&);*
Creates an unshared durable subscription on the specified topic (if one does not already exist) and creates a consumer on that durable subscription. This method creates the durable subscription without a message selector and with a noLocal value of false.
Parameters:

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

returns : JMSConsumer
Exceptions:

  • IllegalStateRuntimeException - if the client identifier is unset
  • InvalidDestinationRuntimeException - if an invalid topic is specified.
  • JMSRuntimeException on 3 cases

1)if the session fails to create the non-shared durable subscription and JMSConsumer due to some internal error
2)if an unshared durable subscription already exists with the same name and client identifier, and there is a consumer already active
3)if a shared durable subscription already exists with the same name and client identifier
JMSConsumer createDurableConsumer(CTopic* topic, mqcstring name,*
mqcstring messageSelector, const mqboolean noLocal)throw (JMSRuntimeException&) ;
Creates an unshared durable subscription on the specified topic (if one does not already exist)and creates a consumer on that durable subscription.This method creates the durable subscription with specifying a message selector and the noLocal parameter
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 added to the durable subscription. A value of null or an empty string indicates that there is no message selector for the durable subscription.
  • noLocal - if true then any messages published to the topic using this session's connection, or any other connection with the same client identifier, will not be added to the durable subscription.

Returns : JMSConsumer
`Exceptions:

  • IllegalStateRuntimeException - if the client identifier is unset
  • InvalidDestinationRuntimeException - if an invalid topic is specified.
  • InvalidSelectorRuntimeException - if the message selector is invalid.
  • JMSRuntimeException on 3 cases
  1. If the session fails to create the non-shared durable subscription and JMSConsumer due to some internal error
  2. If an unshared durable subscription already exists with the same name and client identifier, and there is a consumer already active
  3. If a shared durable subscription already exists with the same name and client identifier

CMapMessage createMapMessage()throw (JMSRuntimeException&) ;*
Creates a MapMessage object. A MapMessage object is used to send a self-defining set of name-value pairs, where names are std::string objects and values are primitive types (float, int, byte, boolean, double, long, string
Parameters : None
returns : newly created CMapMessage
Exceptions: JMSRuntimeException - if the JMS fails to create this message due to some internal error.
CMessage createMessage()throw (JMSRuntimeException&) ;*
Creates a Message object. The Message interface is the root interface of all JMS messages. A Message object holds all the standard message header information. It can be sent when a message containing only header information is sufficient.
Parameters : None
returns : CMessage
Exceptions: JMSRuntimeException - if the JMS fails to create this message due to some internal error.
JMSProducer createProducer() ;*
Creates a new JMSProducer object which can be used to configure and send messages
Parameters : None
Returns :A new JMSProducer object
CQueue createQueue(mqcstring queueName)throw (JMSRuntimeException&) ;*
Creates a Queue object which encapsulates a specified provider-specific queue name.
Parameters : queueName - A provider-specific queue name
Returns : a Queue object which encapsulates the specified name
Exceptions: JMSRuntimeException - if a Queue object cannot be created due to some internal error
JMSConsumer createSharedConsumer(CTopic* topic,mqcstring sharedSubscriptionName)throw (JMSRuntimeException&) ;*
Creates a shared non-durable subscription with the specified name on the specified topic (if one does not already exist) and creates a consumer on that subscription. This method creates the non-durable subscription without a message selector.
Parameters :

  • topic - the non-temporary Topic to subscribe to
  • sharedSubscriptionName - the name used to identify the shared non-durable subscription

returns : JMSConsumer
Exceptions:

    • InvalidDestinationRuntimeException - if an invalid topic is specified.
    • JMSRuntimeException - if the session fails to create the shared non-durable subscription and JMSContext due to some internal error.

JMSConsumer createSharedConsumer(CTopic* topic, mqcstring sharedSubscriptionName, mqcstring messageSelector)throw (JMSRuntimeException&) ;*
Creates a shared non-durable subscription with the specified name on the specified topic (if one does not already exist) specifying a message selector, and creates a consumer on that subscription.
Parameters :

  • topic - the non-temporary Topic to subscribe to
  • sharedSubscriptionName - the name used to identify the shared non-durable subscription
  • messageSelector - only messages with properties matching the message selector expression are added to the shared non-durable subscription. A value of null or an empty string indicates that there is no message selector for the shared non-durable subscription.

Returns : JMSConsumer
Exceptions:

  • InvalidDestinationRuntimeException - if an invalid topic is specified.
  • InvalidSelectorRuntimeException - if the message selector is invalid.
  • JMSRuntimeException - if the session fails to create the shared non-durable subscription and JMSContext due to some internal error.

JMSConsumer createSharedDurableConsumer(CTopic* topic, mqcstring name)throw (JMSRuntimeException&) ;*
Creates an shared durable subscription on the specified topic (if one does not already exist) and creates a consumer on that durable subscription.This method creates the durable subscription without a message selector and with a noLocal value of false.
Parameters :

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

Returns : JMSConsumer
Exceptions:

  • InvalidDestinationRuntimeException - if an invalid topic is specified.
  • JMSRuntimeException on 3 cases
  1. If the session fails to create the non-shared durable subscription and JMSConsumer due to some internal error
  2. If an unshared durable subscription already exists with the same name and client identifier, and there is a consumer already active
  3. If a shared durable subscription already exists with the same name and client identifier

JMSConsumer createSharedDurableConsumer(CTopic* topic, mqcstring name, mqcstring messageSelector) throw (JMSRuntimeException&) ;*
Creates an shared durable subscription on the specified topic (if one does not already exist)and creates a consumer on that durable subscription.This method creates the durable subscription with a message selector.
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 added to the durable subscription. A value of null or an empty string indicatesthat there is no message selector for the durable subscription.

Returns : JMSConsumer
Exceptions:

  • InvalidDestinationRuntimeException - if an invalid topic is specified.
  • InvalidSelectorRuntimeException - if the message selector is invalid.
  • JMSRuntimeException on 3 cases
      1. If the session fails to create the non-shared durable subscription and JMSConsumer due to some internal error
      2. If an unshared durable subscription already exists with the same name and client identifier, and there is a consumer already active
      3. If a shared durable subscription already exists with the same name and client identifier

CStreamMessage createStreamMessage() throw (JMSRuntimeException&) ;*
Creates a StreamMessage object. A StreamMessage object is used to send a self-defining stream of primitive values
Parameters : None
Returns : CStreamMessage object
Exceptions:JMSRuntimeException - if the JMS fails to create this message due to some internal error.
CTemporaryQueue createTemporaryQueue() throw (JMSRuntimeException&) ;*
Creates a TemporaryQueue object. Its lifetime will be that of the JMSContext's Connection unless it is deleted earlier.
Parameters : None
Returns : a temporary queue identity
Exceptions: JMSRuntimeException - if the session fails to create a temporary queue due to some internal error.
CTemporaryTopic createTemporaryTopic() throw (JMSRuntimeException&) ;*
Creates a TemporaryTopic object. Its lifetime will be that of the JMSContext's Connection unless it is deleted earlier.
Parameters : None
Returns : a temporary topic identity
Exceptions: JMSRuntimeException - if the session fails to create a temporary topic due to some internal error.
CTextMessage createTextMessage()throw (JMSRuntimeException&) ;*
Creates a TextMessage object. A TextMessage object is used to send a message containing a String object.
Parameters : None
Returns : CTextMessage
Exceptions: JMSRuntimeException - if the JMS fails to create this message due to some internal error.
CTextMessage createTextMessage(mqcstring text) throw (JMSRuntimeException&) ;*
Creates an initialized TextMessage object. A TextMessage object is used to send a message containing a String.
Parameters : text - the string used to initialize this message
Returns : CtextMessage
Exceptions: JMSRuntimeException - if the JMS fails to create this message due to some internal error.
CTopic createTopic(mqcstring topicName) throw (JMSRuntimeException&) ;*
Creates a Topic object which encapsulates a specified provider-specific topic name.
Parameters : topicName - A provider-specific topic name
Returns : a Topic object which encapsulates the specified name
Exceptions: JMSRuntimeException - if a Topic object cannot be created due to some internal error
mqboolean getAutoStart() ;
Returns whether the underlying connection used by this JMSContext will be started automatically when a consumer is created.
Parameters : None
Returns : whether the underlying connection used by this JMSContext will be started automatically when a consumer is created.
Exceptions: None
mqstring getClientID() throw (JMSRuntimeException&) ;
Gets the client identifier for the JMSContext's connection.
Parameters : None
Return : the unique client identifier
Exceptions: JMSRuntimeException - if the JMS fails to get the clientID due to some internal error
CExceptionListener getExceptionListener() throw (JMSRuntimeException&) ;*
Gets the JMSConsumer's MessageListener.
Parameters : None
Returns : the JMSConsumer's MessageListener, or null if one was not set
Exceptions: JMSRuntimeException - if the JMS fails to get the ExceptionListener for the JMSContext's connection.
CConnectionMetaData getMetaData() throw (JMSRuntimeException&) ; Gets the connection metadata for the JMSContext's connection.*
Parameters : None
Returns : the connection metadata
Exceptions: JMSRuntimeException - if the JMS fails to get the metadata due to some internal error
mqint getSessionMode() throw (JMSRuntimeException&) ;
Returns the session mode of the JMSContext's session.This can be set at the time that the JMSContext is created. Possible values are JMSContext::SESSION_TRANSACTED, JMSContext::AUTO_ACKNOWLEDGE, JMSContext::CLIENT_ACKNOWLEDGE and JMSContext::DUPS_OK_ACKNOWLEDGE. If a session mode was not specified when the JMSContext was created a value of JMSContext::AUTO_ACKNOWLEDGE will be returned.
Parameters : None
Returns : the session mode of the JMSContext's session
Exceptions: JMSRuntimeException - if the JMS fails to return the acknowledgment mode due to some internal error.
mqboolean getTransacted() throw (JMSRuntimeException&) ;
Indicates whether the JMSContext's session is in transacted mode.
Parameters : None
Returns : true if the session is in transacted mode
Exceptions: JMSRuntimeException - if the JMS fails to return the transaction mode due to some internal error.
void recover() throw (JMSRuntimeException&) ;
Stops message delivery in the JMSContext's session, and restarts message delivery with the oldest unacknowledged message.
Parameters : None
Returns : None
Exceptions:

  • JMSRuntimeException - if the JMS fails to commit the transaction due to some internal error
  • IllegalStateRuntimeException - if the JMSContext's session is not using a local transaction

void rollback() throw (JMSRuntimeException&) ;
Rolls back any messages done in this transaction and releases any locks currently held.
Parameters : None
Returns : None
Exceptions:

    • JMSRuntimeException - if the JMS fails to commit the transaction due to some internal error
    • IllegalStateRuntimeException on 2 case
  1. If the JMSContext's session is not using a local transaction
  2. If this method has been called by a CompletionListener callback method on its own JMSContext

void setAutoStart(const mqboolean autoStart) ;
Specifies whether the underlying connection used by this JMSContext will be started automatically when a consumer is created. This is the default behaviour, and it may be disabled by calling this method with a value of false.
Parameters : autoStart - Whether the underlying connection used by this JMSContext will be automatically started when a consumer is created.
Returns : None
Exceptions: None
void setClientID(mqcstring clientID) throw (JMSRuntimeException&) ;
Sets the client identifier for the JMSContext's connection.
Parameters : clientID - the unique client identifier
Returns : the JMSConsumer's MessageListener, or null if one was not set
Exceptions:

  • InvalidClientIDRuntimeException - if the JMS client specifies an invalid or duplicate client ID.
  • IllegalStateRuntimeException - if the JMS client attempts to set the client ID for the JMSContext's connection at the wrong time
  • JMSRuntimeException - if the JMS fails to set the clientID due to some internal error

void setExceptionListener(CExceptionListener listener) throw (JMSRuntimeException&) ;*
Sets the JMSConsumer's MessageListener.
Parameters : listener - the exception listener
Returns : None
Exceptions: JMSRuntimeException - if the JMS fails to set the ExceptionListener for the JMSContext's connection.
void start() throw (JMSRuntimeException&) ;
Starts (or restarts) delivery of incoming messages by the JMSContext's connection. A call to start on a connection that has already been started is ignored.
Parameters : None
Returns : None
Exceptions: JMSRuntimeException - if the JMS fails to start message delivery due to some internal error.
void stop() throw (JMSRuntimeException&) ;
Temporarily stops the delivery of incoming messages by the JMSContext's connection.Delivery can be restarted using the 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.
Parameters : None
Returns : None
throw :

  • JMSRuntimeException - if the JMS fails to stop the message delivery due to some internal error.
  • IllegalStateRuntimeException - if this method has been called by a MessageListener on its own JMSContext

void unsubscribe(mqcstring name) throw (JMSRuntimeException&) ;
Unsubscribes a durable subscription that has been created by a client.
Parameters : name - the name used to identify this subscription
Returns : None
Exceptions:

  • JMSRuntimeException - if the session fails to unsubscribe to the durable subscription due to some internal error.
  • InvalidDestinationRuntimeException - if an invalid subscription name is specified.

 

JMSProducer


JMSProducer is a simple object used to send messages on behalf of a JMSContext. An instance of JMSProducer is created by calling the createProducer method on a JMSContext. It provides various send methods to send a message to a specified destination. It also provides methods to allow message send options, message properties and message headers to be specified prior to sending a message or set of messages.
Message send options may be specified using one or more of the following methods: setDeliveryMode, setPriority, setTimeToLive, setDeliveryDelay, setDisableMessageTimestamp,setDisableMessageID and setAsync.
Message properties may be may be specified using one or more of nine setProperty methods. Any message properties set using these methods will override any message properties that have been set directly on the message.
Message headers may be specified using one or more of the following methods: setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSType or setJMSReplyTo. Any message headers set using these methods will override any message headers that have been set directly on the message.
All the above methods return the JMSProducer to allow method calls to be chained together, allowing a fluid programming style. For example:
context.createProducer().setDeliveryMode(DeliveryMode.NON_PERSISTENT).setTimeToLive(1000).send(destination, message);
Instances of JMSProducer are intended to be lightweight objects which can be created freely and which do not consume significant resources. This interface therefore does not provide aclose method.

Subclasses

FioranoJMSProducer

Methods

JMSProducer clearProperties() throw (JMSRuntimeException&) ;*
Clears any message properties set on this JMSProducer
Parameters : None
Returns : this JMSProducer object
Exception : JMSRuntimeException - if the JMS fails to clear the message properties due to some internal error.
CompletionListener getAsync() const throw (JMSRuntimeException&) ;*
If subsequent calls to send on this JMSProducer object have been configured to be asynchronous then this method returns the CompletionListener that has previously been configured. If subsequent calls to send have been configured to be synchronous then this method returns null.
Parameters : None
Returns : the CompletionListener or null
Exceptions : JMSRuntimeException - if the JMS fails to get the required information due to some internal error.
mqboolean getBooleanProperty(mqcstring name) throw (JMSRuntimeException&) ;
Returns the message property with the specified name that has been set on this JMSProducer, converted to a boolean.
Parameters : name - the name of the property
Returns : the property value, converted to a boolean
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.

mqbyte getByteProperty(mqcstring name) throw (JMSRuntimeException&) ;
Returns the message property with the specified name that has been set on this JMSProducer, converted to a byte.
Parameters : name - the name of the property
Returns : the property value, converted to a byte
Exceptions :

    • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
    • MessageFormatRuntimeException - if this type conversion is invalid.

mqlong getDeliveryDelay() const throw (JMSRuntimeException&) ;
Gets the minimum length of time in milliseconds that must elapse after a message is sent before the JMS may deliver the message to a consumer.
Parameters : None
Returns : the delivery delay in milliseconds.
Exceptions : JMSRuntimeException - if the JMS fails to get the delivery delay due to some internal error.
mqint getDeliveryMode() const throw (JMSRuntimeException&) ;
Returns the delivery mode of messages that are sent using this JMSProducer
Parameters : None
Returns : the message delivery mode
Exceptions : JMSRuntimeException - if the JMS fails to get the delivery mode due to some internal error.
mqboolean getDisableMessageID() const throw (JMSRuntimeException&) ;
Gets an indication of whether message IDs are disabled.
Parameters : None
Returns : an indication of whether message IDs are disabled
Exceptions : JMSRuntimeException - if the JMS fails to determine if message IDs are disabled due to some internal error.
mqboolean getDisableMessageTimestamp() const throw (JMSRuntimeException&) ;
Gets an indication of whether message timestamps are disabled.
Parameters : None
Returns : an indication of whether message timestamps are disabled
Exceptions : JMSRuntimeException - if the JMS fails to determine if timestamps are disabled due to some internal error.
mqdouble getDoubleProperty(mqcstring name) throw (JMSRuntimeException&);
Returns the message property with the specified name that has been set on this JMSProducer, converted to a double.
Parameters : name - the name of the property
Returns : the property value, converted to a double
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.

mqfloat getFloatProperty(mqcstring name) throw (JMSRuntimeException&) ;
Returns the message property with the specified name that has been set on this JMSProducer, converted to a float.
Parameters : name - the name of the property
Returns : the property value, converted to a float
Exceptions :

    • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
    • MessageFormatRuntimeException - if this type conversion is invalid.

mqint getIntProperty(mqcstring name) throw (JMSRuntimeException&) ;
Returns the message property with the specified name that has been set on this JMSProducer, converted to a int.
Parameters : name - the name of the property
Returns : the property value, converted to a int
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.

mqstring getJMSCorrelationID() const throw (JMSRuntimeException&) ;
Returns the JMSCorrelationID header value that has been set on this JMSProducer, as a String.
Parameters : None
Returns : the correlation ID of a message as a String
Exceptions : JMSRuntimeException - if the JMS fails to get the correlation ID due to some internal error.
mqchar getJMSCorrelationIDAsBytes(mqint length) throw (JMSRuntimeException&) ;
Returns the JMSCorrelationID header value that has been set on this JMSProducer, as an array of bytes.
Parameters : length - pointer to an integer, which contains the length of the output byte array
Returns : the correlation ID as an array of bytes
Exceptions : JMSRuntimeException - if the JMS fails to get the correlation ID due to some internal error.
CDestination getJMSReplyTo() const throw (JMSRuntimeException&) ;*
Returns the JMSReplyTo header value that has been set on this JMSProducer.
Parameters : None
Returns : Destination the JMSReplyTo header value
Exceptions : JMSRuntimeException - if the JMS fails to get the JMSReplyTo destination due to some internal error.
mqstring getJMSType() const throw (JMSRuntimeException&) ;
Returns the JMSType header value that has been set on this JMSProducer.
Parameters : None
Returns : the message type
Exceptions : JMSRuntimeException - if the JMS fails to get the message type due to some internal error.
mqlong getLongProperty(mqcstring name) throw (JMSRuntimeException&);
Returns the message property with the specified name that has been set on this JMSProducer, converted to a long.
Parameters : name - the name of the property
Returns : the property value, converted to a long
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.

mqint getPriority() const throw (JMSRuntimeException&) ;
Return the priority of messages that are sent using this JMSProducer
Parameters : None
Returns : the message priority
Exceptions : JMSRuntimeException - if the JMS fails to get the priority due to some internal error.
std::vector<mqstring> getPropertyNames() throw (JMSRuntimeException&) ;
Returns a vector of the names of all the message properties that have been set on this JMSProducer.
Parameters : None
Returns : a vector containing the names of all the message properties that have been set on this JMSProducer
Exceptions : JMSRuntimeException - if the JMS fails to get the property names due to some internal error.
mqshort getShortProperty(mqcstring name) throw (JMSRuntimeException&) ;
Returns the message property with the specified name that has been set on this JMSProducer, converted to a short.
Parameters : name - the name of the property
Returns : the property value, converted to a short
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.


mqstring getStringProperty(mqcstring name) throw (JMSRuntimeException&);
Returns the message property with the specified name that has been set on this JMSProducer, converted to a string.
Parameters : name - the name of the property
Returns : the property value, converted to a string
Exceptions :

  • JMSRuntimeException - if the JMS fails to get the property value due to some internal error.
  • MessageFormatRuntimeException - if this type conversion is invalid.

mqlong getTimeToLive() const throw (JMSRuntimeException&) ;
Returns the time to live of messages that are sent using this JMSProducer.
Parameters : None
Returns : The message time to live in milliseconds; a value of zero means that a message never expires.
Exceptions : JMSRuntimeException - if the JMS fails to get the time to live due to some internal error.
mqboolean propertyExists(mqcstring name)throw (JMSRuntimeException&) ;
Indicates whether a message property with the specified name has been set on this JMSProducer
Parameters: name - the name of the property
Returns : true whether the property exists
Exception : JMSRuntimeException - if the JMS fails to clear the message properties due to some internal error.
JMSProducer send(CDestination* destination, CMessage* message) throw (JMSRuntimeException&);*
Sends a message to the specified destination, using any send options,message properties and message headers that have been defined on this JMSProducer.
Parameters :

  • destination - the destination to send this message to
  • message - the message to send

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to send the message due to some internal error.
  • InvalidDestinationRuntimeException - if a client uses this method with an invalid destination.
  • MessageFormatRuntimeException - if an invalid message is specified.


JMSProducer send(CDestination* destination, mqcstring body) throw (JMSRuntimeException&) ;*
Send a TextMessage with the specified body to the specified destination, using any send options,message properties and message headers that have been defined on this JMSProducer.
Parameters :

  • destination - the destination to send this message to
  • body - the body of the TextMessage that will be sent.

If a null value is specified then a TextMessage with no body will be sent.
Returns : this JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to send the message due to some internal error.
  • InvalidDestinationRuntimeException - if a client uses this method with an invalid destination.
  • MessageFormatRuntimeException - if an invalid message is specified.

JMSProducer send(CDestination* destination, mqchar* body, const mqint length) throw (JMSRuntimeException&);*
Send a BytesMessage with the specified body to the specified destination,using any send options, message properties and message headers that have been defined on this JMSProducer.
Parameters :

  • destination - the destination to send this message to
  • body - the body of the BytesMessage that will be sent.
  • length - the length of the body.

If a null value is specified then a BytesMessage with no body will be sent.
Returns : this JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to send the message due to some internal error.
  • InvalidDestinationRuntimeException - if a client uses this method with an invalid destination.
  • MessageFormatRuntimeException - if an invalid message is specified.

JMSProducer send(CDestination* destination, CMap<mqstring, CProperty*>* body) throw (JMSRuntimeException&);*
Send a MapMessage with the specified body to the specified destination, using any send options, message properties and message headers that have been defined on this JMSProducer.Using any send options, message properties and message headers that have been defined on this JMSProducer.
Parameters :

  • destination - the destination to send this message to
  • body - the body of the MapMessage that will be sent. If a null value is specified then a MapMessage with no map entries will be sent.

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to send the message due to some internal error.
  • InvalidDestinationRuntimeException - if a client uses this method with an invalid destination.
  • MessageFormatRuntimeException - if an invalid message is specified.

JMSProducer setAsync(CompletionListener* completionListener) throw (JMSRuntimeException&) ;*
Specifies whether subsequent calls to send on this JMSProducer object should be synchronous or asynchronous. If the specified CompletionListener is not null then subsequent calls to send will be asynchronous. If the specified CompletionListener is null then subsequent calls to send will be synchronous. Calls to send are synchronous by default. the specified property set to the specified boolean value. This will replace any property of the same name that is already set on the message being sent.
Parameters: completionListener - If asynchronous send behaviour is required, this should be set to a CompletionListener to be notified when the send has completed. If synchronous send behaviour is required, this should be set to null.
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if an internal error occurs
JMSProducer setDeliveryDelay(const mqlong deliveryDelay) throw (JMSRuntimeException&);*
Sets the minimum length of time in milliseconds that must elapse after a message is sent before the JMS may deliver the message to a consumer. For transacted sends, this time starts when the client sends the message, not when the transaction is committed. deliveryDelay is set to zero by default.
Parameters : deliveryDelay - the delivery delay in milliseconds.
Returns : this JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the delivery delay due to some internal error.
MSProducer setDeliveryMode(const mqint deliveryMode) throw (JMSRuntimeException&);*
Specifies the delivery mode of messages that are sent using this JMSProducer. Delivery mode is set to PERSISTENT by default.
Parameters : deliveryMode - the message delivery mode to be used; legal values are CDeliveryMode::NON_PERSISTENT and CDeliveryMode::PERSISTENT
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the delivery mode due to some internal error.
JMSProducer setDisableMessageID(const mqboolean value) throw (JMSRuntimeException&) ;*
Specifies whether message IDs may be disabled for messages that are sent using this JMSProducer
Parameters : param value - indicates whether message IDs may be disabled
Returns : this JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set message ID to disabled due to some internal error.
JMSProducer setDisableMessageTimestamp(const mqboolean value) throw (JMSRuntimeException&) ;*
Specifies whether message timestamps may be disabled for messages that are sent using this JMSProducer
Parameters : value - indicates whether message timestamps may be disabled
Returns : this JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set timestamps to disabled due to some internal error.
JMSProducer setJMSCorrelationID(mqcstring correlationID) throw (JMSRuntimeException&) ;*
Specifies that messages sent using this JMSProducer will have their JMSCorrelationID header value set to the specified correlation ID, where correlation ID is specified as a String.
Parameters : correlationID - the message ID of a message being referred to
Returns : this JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the correlation ID due to some internal error.
JMSProducer setJMSCorrelationIDAsBytes(mqchar* correlationID,const mqint length ) throw (JMSRuntimeException&);*
Specifies that messages sent using this JMSProducer will have their JMSCorrelationID header value set to the specified correlation ID, where correlation ID is specified as an array of bytes.
Parameters :

    • correlationID - the correlation ID value as an array of bytes
    • length - length of the correlation ID.

Returns : this JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the correlation ID due to some internal error.
JMSProducer setJMSReplyTo(CDestination* replyTo) throw (JMSRuntimeException&);*
Specifies that messages sent using this JMSProducer will have their JMSReplyTo header value set to the specified Destination object. This will override any JMSReplyTo header value that is already set on the message being sent.
Parameters : replyTo - Destination to which to send a response to this message
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the JMSReplyTo destination due to some internal error.
JMSProducer setJMSType(mqcstring type) throw (JMSRuntimeException&);*
Specifies that messages sent using this JMSProducer will have their JMSType header value set to the specified message type. This will override any JMSType header value that is already set on the message being sent.
Parameters : type - the message type
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the message type due to some internal error.
JMSProducer setPriority(const mqint priority) throw (JMSRuntimeException&);*
Specifies the priority of messages that are sent using this JMSProducer. The JMS API defines ten levels of priority value, with 0 as the lowest priority and 9 as the highest. Clients should consider priorities 0-4 as gradations of normal priority and priorities 5-9 as gradations of expedited priority. Priority is set to 4 by default.
Parameters : priority - the message priority to be used; must be a value between 0 and 9
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the priority due to some internal error.
JMSProducer setProperty(mqcstring name, const mqboolean value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified boolean value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the boolean property value to set

Returns : this JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqbyte value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified byte value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

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

Returns : this JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqfloat value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified float value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the float property value to set

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqdouble value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified double value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the double property value to set

Returns : This JMSProducer object
Exceptions :

    • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
    • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqint value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified int value.This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the int property value to set

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqlong value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified long value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the long property value to set

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, const mqshort value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified short value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the short property value to set

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setProperty(mqcstring name, mqcstring value) throw (JMSRuntimeException&, IllegalArgumentException&);*
Specifies that messages sent using this JMSProducer will have the specified property set to the specified string value. This will replace any property of the same name that is already set on the message being sent.
Parameters :

  • name - the name of the property
  • value - the string property value to set

Returns : This JMSProducer object
Exceptions :

  • JMSRuntimeException - if the JMS fails to set the property due to some internal error.
  • IllegalArgumentException - if the name is null or if the name is an empty string.

JMSProducer setTimeToLive(const mqlong timeToLive) throw (JMSRuntimeException&);*
Specifies the time to live of messages that are sent using this JMSProducer. This is used to determine the expiration time of a message. The expiration time of a message is the sum of the message's time to live and the time it is sent. For transacted sends, this is the time the client sends the message, not the time the transaction is committed. Clients should not receive messages that have expired; however, JMS does not guarantee that this will not happen. A JMS should do its best to accurately expire messages; however, JMS does not define the accuracy provided. It is not acceptable to simply ignore time-to-live. Time to live is set to zero by default, which means a message never expires.
Parameters : timeToLive - the message time to live to be used, in milliseconds; a value of zero means that a message never expires.
Returns : This JMSProducer object
Exceptions : JMSRuntimeException - if the JMS fails to set the time to live due to some internal error.

JMSConsumer

A client using the simplified JMS API introduced for JMS 2.0 uses a JMSConsumer object to receive messages from a queue or topic. A JMSConsumer object may be created either created by passing a Queue or Topic object to one of the createConsumer methods on a JMSContext. or by passing a Topic object to one of the createSharedConsumer or createDurableConsumer methods on a JMSContext.
JMSConsumer can be created with a message selector. A message selector allows the client to restrict the messages delivered to the JMSConsumer to those that match the selector.
A client may either synchronously receive a JMSConsumer's messages or have the JMSConsumer asynchronously deliver them as they arrive.
For synchronous receipt, a client can request the next message from a JMSConsumer using one of its receive methods. There are several variations of receive that allow a client to poll or wait for the next message.
For asynchronous delivery, a client can register a MessageListener object with a JMSConsumer. As messages arrive at the JMSConsumer, it delivers them by calling the MessageListener 's onMessage method.

Inheritance hierarchy

JMSConsumer CClosable

Subclasses

FioranoJMSConsumer

Methods

void close() throw (JMSRuntimeException&);
Closes this resource, relinquishing any underlying resources.
Parameters : None
Returns : None
Exceptions :JMSRuntimeException - if the JMS fails to close the consumer due to some internal error.
CMessageListener getMessageListener()const throw (JMSRuntimeException&) ;*
Gets the JMSConsumer's MessageListener.
Parameters : None
Returns : the JMSConsumer's MessageListener, or null if one was not set
Exceptions : JMSRuntimeException - if the JMS fails to get Message listener due to some internal error
mqstring getMessageSelector() const throw (JMSRuntimeException&) ;
Gets this JMSConsumer's message selector expression
Parameters : None
Returns : This JMSConsumer's message selector, or null if no message selector exists for the JMSConsumer (that is, if the message selector was not set or was set to null or the empty string)
Exceptions : JMSRuntimeException - if the JMS fails to get Message selector due to some internal error
CMessage receive();*
Receives the next message produced for this JMSConsumer. This call blocks indefinitely until a message is produced or until this JMSConsumer is closed. If this receive is done within a transaction, the JMSConsumer retains the message until the transaction commits.
Parameters : None
Returns : the next message produced for this JMSConsumer, or null if this JMSConsumer is concurrently closed
Exceptions : JMSRuntimeException - if the JMS fails to receive the next message due to some internal error.
CMessage receive(const mqlong timeout);*
Receives the next message that arrives within the specified timeout interval. This call blocks until a message arrives, the timeout expires, or this JMSConsumer 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 JMSConsumer, or null if this JMSConsumer is concurrently closed
Exceptions : JMSRuntimeException - if the JMS fails to receive the next message due to some internal error.
mqstring receiveBody(mqcstring text) throw (JMSRuntimeException&);
Receives the next TextMessage produced for this JMSConsumer and returns its body of that message, (corresponding text)
Parameters : text - any string indicating that this function is going to receive Text Message
Returns : the body (text) of the message, or empty string if this JMSConsumer is concurrently closed
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not text message

mqchar receiveBody(mqchar* byteArray, mqint* length) throw (JMSRuntimeException&) ;*
Receives the next BytesMessage produced for this JMSConsumer and returns its body of that message, (corresponding bytes)
Parameters :

  • byteArray - Any byte Array indicating that this function is going to receive Bytes Message
  • length - pointer to an integer, which contains the length of the output byte array

Returns : The body (bytearray) of the message, or NULL if this JMSConsumer is concurrently closed
Note: the user has to delete the returned byte array using delete []
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message


CMap<mqstring,CProperty>* receiveBody(CMap<mqstring,CProperty*>* mapObject) throw (JMSRuntimeException&);*
Receives the next MapMessage produced for this JMSConsumer and returns its body if that message, (corresponding map object)
Parameters : Map object - An map object of type type <mqstring, CProperty*> indicating that this function is going to receive Map Message
Returns : The body (Map) of the message, or NULL if this JMSConsumer is concurrently closed
Note: the user has to delete the returned map object using delete operator, also each CProperty* object inside the returned map.
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message


mqstring receiveBody(mqcstring text,const mqlong timeout) throw (JMSRuntimeException&);
Receives the next TextMessage produced for this JMSConsumer that arrives within the specified timeout period and returns its body of that message, (corresponding text)
Parameters :

  • text - any string indicating that this function is going to receive Text Message
  • timeout - the timeout value (in milliseconds)

Returns : The body (text) of the message, or empty string if this JMSConsumer is concurrently closed
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not text message

mqchar receiveBody(mqchar* byteArray, mqint* length, const mqlong timeout) throw (JMSRuntimeException&);*
Receives the next BytesMessage produced for this JMSConsumer that arrives within the specified timeout period and returns its body of that message, (corresponding bytes)
Parameters :

  • byteArray - Any byte Array indicating that this function is going to receive Bytes Message
  • length - pointer to an integer, which contains the length of the output byte array
  • timeout - the timeout value (in milliseconds)

Returns : The body (bytearray) of the message, or NULL if this JMSConsumer is concurrently closed
Note: the user has to delete the returned byte array using delete []
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message

CMap<mqstring,CProperty>* receiveBody(CMap<mqstring,CProperty*>* mapObject,const mqlong timeout) throw (JMSRuntimeException&);*
Receives the next MapMessage produced for this JMSConsumer that arrives within the specified timeout period and returns its body of that message, (corresponding map object)
Parameters :

    • Map object - An map object of type type <mqstring, CProperty*> indicating that this function is going to receive Map Message
    • timeout - the timeout value (in milliseconds)

Returns : The body (Map) of the message, or NULL if this JMSConsumer is concurrently closed.
Note: the user has to delete the returned map object using delete operator, also each CProperty* object inside the returned map.
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message

mqstring receiveBodyNoWait(mqcstring text) throw (JMSRuntimeException&);
Receives the next TextMessage produced for this JMSConsumer without any waiting time and if there is no message available to receive it will return empty string and returns its body of that message, (corresponding text)
Parameters : text - any string indicating that this function is going to receive Text Message
Returns : The body (text) of the message, or empty string if this JMSConsumer is concurrently closed
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not text message

mqchar receiveBodyNoWait(mqchar* byteArray, mqint* length) throw (JMSRuntimeException&) ;*
Receives the next BytesMessage produced for this JMSConsumer without any waiting time and if there is no message available to receive it will return NULL and returns its body of that message, (corresponding bytes)
Parameters :

  • byteArray - Any byte Array indicating that this function is going to receive Bytes Message
  • length - pointer to an integer, which contains the length of the output byte array

Returns : the body (bytearray) of the message, or NULL if this JMSConsumer is concurrently closed
Note:: the user has to delete the returned byte array using delete []
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message

CMap<mqstring,CProperty>* receiveBodyNoWait(CMap<mqstring,CProperty*>* mapObject) throw (JMSRuntimeException&);*
Receives the next MapMessage produced for this JMSConsumer without any waiting time and returns its body of that message, (corresponding map object) and if there is no message available to receive it will return NULL
Parameters : Map object - An map object of type type <mqstring, CProperty*> indicating that this function is going to receive Map Message
Returns : the body (Map) of the message, or NULL if this JMSConsumer is concurrently closed
Note: the user has to delete the returned map object using delete operator, also each CProperty* object inside the returned map.
Exceptions :

  • JMSRuntimeException - if the JMS fails to receive the next message due to some internal error
  • MessageFormatRuntimeException -if the message is not bytes message


CMessage receiveNoWait();*
Receives the next message if one is immediately available.
Parameters : None
Returns : The next message produced for this JMSConsumer, or null if one is not available
Exceptions : JMSRuntimeException - if the JMS fails to receive the next message due to some internal error.
void setMessageListener(CMessageListener listener) throw (JMSRuntimeException&) ;*
Sets the JMSConsumer's MessageListener.Setting the MessageListener to null is the equivalent of unsetting the MessageListener for the JMSConsumer.
Parameters : listener - the listener to which the messages are to be delivered
Returns : None
Exceptions : JMSRuntimeException - if the JMS fails to set the Message listener due to some internal error

JMSRuntimeException

JMSRuntimeException is the root class of the all JMS level Runtime exceptions.

Inheritance Hierarchy





Subclasses

  • IllegalStateRuntimeException
  • InvalidDestinationRuntimeException
  • InvalidSelectorRuntimeException
  • MessageNotWritableRuntimeException
  • MessageFormatRuntimeException

Constructors


JMSRuntimeException()
Default Constructor.
JMSRuntimeException( cException& ex );
Creates a new JMSRuntimeException with the given cause.
Parameters: ex – Root cause for this JMSRuntimeException
JMSRuntimeException( const mqchar *** file, const mqint lineNumber, const mqchar* func, mqcstring msg);
Creates a new JMSRuntimeException with the given message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.


JMSRuntimeException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg);*
Creates a new JMSRuntimeException with the given errorcode, message and from where it gets occurred..
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.


JMSRuntimeException( const mqchar file, const mqint lineNumber, const mqchar* func, Exception& cause);*
Creates a new JMSRuntimeException with the given root cause and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • cause – Root Cause for this exception


JMSRuntimeException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring errorcode, mqcstring msg, Exception& cause);*
Creates a new JMSRuntimeException with the given root cause, message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

JMSRuntimeException( const mqchar file, const mqint lineNumber, const mqchar* func, mqcstring msg, Exception& cause);*
Creates a new JMSRuntimeException with the given root cause, errorcode , message and from where it gets occurred.
Parameters:

  • file - File in which the exception is thrown.
  • lineNumber - Line information in which the exception is thrown.
  • func – Function at which the exception is created
  • errorcode - Error code set for the exception.
  • msg - Error message that describes the exception.
  • cause – Root Cause for this exception

 

Adaptavist ThemeBuilder EngineAtlassian Confluence