org.apache.qpid.example.subscriber
Class Subscriber

java.lang.Object
  extended by org.apache.qpid.example.subscriber.Subscriber
Direct Known Subclasses:
MonitoredSubscriber

public class Subscriber
extends Object

Subscriber which consumes messages from a queue


Nested Class Summary
static class Subscriber.ExampleMessageListener
          Listener class that handles messages
 
Field Summary
protected  Connection _connection
           
protected  org.apache.qpid.client.AMQConnectionFactory _connectionFactory
           
protected  MessageConsumer _consumer
           
protected  InitialContextHelper _contextHelper
           
protected  Destination _destination
           
 
Constructor Summary
Subscriber()
           
 
Method Summary
 void stop()
          Stop consuming and close connection
 void subscribe()
          Subscribes to example Queue and attaches listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_connection

protected Connection _connection

_consumer

protected MessageConsumer _consumer

_contextHelper

protected InitialContextHelper _contextHelper

_connectionFactory

protected org.apache.qpid.client.AMQConnectionFactory _connectionFactory

_destination

protected Destination _destination
Constructor Detail

Subscriber

public Subscriber()
Method Detail

subscribe

public void subscribe()
Subscribes to example Queue and attaches listener


stop

public void stop()
Stop consuming and close connection



Licensed to the Apache Software Foundation