

Public Member Functions | |
| Consumer (int n) | |
| void | onMessage (javax.jms.Message message) |
Static Public Member Functions | |
| static void | main (String[] args) |
Private Member Functions | |
| void | consume () |
Static Private Member Functions | |
| static void | printUsage () |
Private Attributes | |
| Subscriber | sub = null |
| int | number = 1 |
| int | msgCounter = 1 |
| long | prevTimestamp = 0 |
| long | currTimestamp = 0 |
| long | interval = 0 |
| float | throughput = 0 |
Static Private Attributes | |
| static final String | TOPIC = "CMW.TEMP.THROUGHPUT" |
Message consumer test example. Usage : java Consumer msg_nr. Subscribes to a predefined topic CMW.TEMP and prints statistics on throughput every msg_nr messages received.
| cern::cmw::mom::test::Consumer::Consumer | ( | int | n | ) | [inline] |
| void cern::cmw::mom::test::Consumer::consume | ( | ) | [inline, private] |
Method consume
References sub, cern::cmw::mom::pubsub::Subscriber::subscribe(), and TOPIC.
Referenced by Consumer().
| static void cern::cmw::mom::test::Consumer::main | ( | String[] | args | ) | [inline, static] |
| void cern::cmw::mom::test::Consumer::onMessage | ( | javax.jms.Message | message | ) | [inline] |
Method onMessage
| message |
References currTimestamp, interval, msgCounter, number, prevTimestamp, and throughput.
| static void cern::cmw::mom::test::Consumer::printUsage | ( | ) | [inline, static, private] |
Method printUsage
Referenced by main().
long cern::cmw::mom::test::Consumer::currTimestamp = 0 [private] |
Referenced by onMessage().
long cern::cmw::mom::test::Consumer::interval = 0 [private] |
Referenced by onMessage().
int cern::cmw::mom::test::Consumer::msgCounter = 1 [private] |
Referenced by onMessage().
int cern::cmw::mom::test::Consumer::number = 1 [private] |
Referenced by Consumer(), main(), and onMessage().
long cern::cmw::mom::test::Consumer::prevTimestamp = 0 [private] |
Referenced by onMessage().
Subscriber cern::cmw::mom::test::Consumer::sub = null [private] |
Referenced by consume(), and Consumer().
float cern::cmw::mom::test::Consumer::throughput = 0 [private] |
Referenced by onMessage().
final String cern::cmw::mom::test::Consumer::TOPIC = "CMW.TEMP.THROUGHPUT" [static, private] |
Referenced by consume().
1.6.2