org.apache.qpid.example.pubsub
Class Subscriber
java.lang.Object
org.apache.qpid.example.pubsub.Client
org.apache.qpid.example.pubsub.Subscriber
- All Implemented Interfaces:
- MessageListener
public class Subscriber
- extends Client
- implements MessageListener
Simple client that listens for the specified number of msgs on the given Destinaton
The class can take two arguments.
java Subscriber
Where:
destination is either 'topic' or 'queue' (Default: topic)
msgCount is the number of messages to send (Default : 100)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_count
CountDownLatch _count
Subscriber
public Subscriber(String destination,
int msgCount)
start
public void start()
- Specified by:
start
in class Client
main
public static void main(String[] args)
onMessage
public void onMessage(Message message)
- Specified by:
onMessage
in interface MessageListener
Licensed to the Apache Software Foundation