cern::cmw::mom::test::HelloWorld Class Reference

Inheritance diagram for cern::cmw::mom::test::HelloWorld:
Inheritance graph
[legend]
Collaboration diagram for cern::cmw::mom::test::HelloWorld:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HelloWorld ()
void subscribeToHelloWorld ()
void publishToHelloWorld ()
void close ()
void onMessage (javax.jms.Message m)

Static Public Member Functions

static void main (String[] args)

Private Attributes

Publisher pub = null
Subscriber sub = null
long subscriptionToken = 0

Static Private Attributes

static final String HELLO_TOPIC = "CMW.TEMP.Hello"
static final String MSG_TXT = "Hello World !!"
static final String TEXT_MAP_FIELD = "TXT"
static final String TIMESTAMP_MAP_FIELD = "TS"
static final Category cat = Category.getInstance(HelloWorld.class.getName())

Detailed Description

The HelloWorld example. A publisher publishes the message 'Hello World!' to the topic CMW.TEMP.Hello and a subscriber subscribes to it.


Constructor & Destructor Documentation

cern::cmw::mom::test::HelloWorld::HelloWorld (  )  [inline]

Instantiates Publisher & Subscriber, sets up the subscription and publishes the message

References cat, pub, publishToHelloWorld(), sub, and subscribeToHelloWorld().

Referenced by main().


Member Function Documentation

void cern::cmw::mom::test::HelloWorld::close (  )  [inline]
static void cern::cmw::mom::test::HelloWorld::main ( String[]  args  )  [inline, static]

Method main

Parameters:
args 

References HelloWorld().

void cern::cmw::mom::test::HelloWorld::onMessage ( javax.jms.Message  m  )  [inline]

Method implementing the message handler defined in the SubscriptionListener interface.

Parameters:
m 

References cat, close(), TEXT_MAP_FIELD, and TIMESTAMP_MAP_FIELD.

void cern::cmw::mom::test::HelloWorld::publishToHelloWorld (  )  [inline]
void cern::cmw::mom::test::HelloWorld::subscribeToHelloWorld (  )  [inline]

Sets up the subscription.

References cat, HELLO_TOPIC, sub, cern::cmw::mom::pubsub::Subscriber::subscribe(), and subscriptionToken.

Referenced by HelloWorld().


Member Data Documentation

final Category cern::cmw::mom::test::HelloWorld::cat = Category.getInstance(HelloWorld.class.getName()) [static, private]
final String cern::cmw::mom::test::HelloWorld::HELLO_TOPIC = "CMW.TEMP.Hello" [static, private]

The Topic name.

Referenced by publishToHelloWorld(), and subscribeToHelloWorld().

final String cern::cmw::mom::test::HelloWorld::MSG_TXT = "Hello World !!" [static, private]

The message text.

Referenced by publishToHelloWorld().

The Publisher instance.

Referenced by close(), HelloWorld(), and publishToHelloWorld().

The Subscriber instance.

Referenced by close(), HelloWorld(), and subscribeToHelloWorld().

The subscription token.

Referenced by close(), and subscribeToHelloWorld().

final String cern::cmw::mom::test::HelloWorld::TEXT_MAP_FIELD = "TXT" [static, private]

The MapMessage message fields.

Referenced by onMessage(), and publishToHelloWorld().

final String cern::cmw::mom::test::HelloWorld::TIMESTAMP_MAP_FIELD = "TS" [static, private]

Referenced by onMessage(), and publishToHelloWorld().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2