Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress C++ API Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::JmsClient

Group:  JMS Transport


Does not inherit

Local Index

Members

Header File

#include rwsf/transport/jms/JmsClient.h

Description

Class JmsClient represents a JMS client. It is instantiated by specifying a JMS provider and queue name. Once instantiated, messages can be produced to, or consumed from, a JMS queue. JMS operations are realized by the RWSFJavaImp.java and other java classes via JNI.

No JNI nor Java knowledge is required to use this class, just a basic understanding of the JMS fundamentals.

Due to JNI limitations, this class cannot be instantiated in one thread and then passed to another. If this is necessary, the class can be instantiated in one thread with the autoRelease constructor argument set to false. Then call getID() and pass that ID to the other thread, and use the id constructor. If autoRelease is false, then the original JmsClient instance may go out of scope, since the actual RWSFJavaImp instance is maintained in the JVM in the RWSFStaticMapper class. When autoRelease is false, the RWSFJavaImp instance is removed from the JVM by calling releaseJmsImp().

Public Typedefs

jint InstanceIdType;

Public Enums

ReceiveMode { RECEIVE_NOWAIT, RECEIVE_BLOCKING }

Public Constructors

JmsClient(const std::string & providerName,
    const std::string & queueName,
    bool autoAck = true,
    ReceiveMode rxMode = RECEIVE_BLOCKING,
    bool autoRelease = true);
JmsClient(InstanceIdType id,
    bool autoRelease = true);

Public Destructors

virtual
~JmsClient();

Public Member Functions

void
acknowledgeMessage(const std::string & msgStr);
std::string
consumeObject();
std::string
consumeText();
void
createConsumer();
void
createProducer();
InstanceIdType
getID();
void
interruptConsumer();
bool
isValid() const;
void
produceObject(const std::string & className,
    const std::string & msgStr);
void
produceText(const std::string & msgStr);
int
queueMessageCount();
void
releaseJmsImp();
void
start();
void
stop();

Public Operators

void
operator<<(const std::string & msgStr);
void
operator>>(std::string & consumedMsgText);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.