org.exolab.jms.tools.migration.proxy
Class Consumer

java.lang.Object
  |
  +--org.exolab.jms.tools.migration.proxy.Consumer

public class Consumer
extends java.lang.Object

Manages the state of an individual consumer.

Version:
$Revision: 1.2 $ $Date: 2005/10/20 14:07:03 $
Author:
Tim Anderson

Constructor Summary
Consumer(org.exolab.jms.client.JmsQueue queue)
          Construct a new Consumer for a queue.
Consumer(java.lang.String name, java.lang.String clientId)
          Construct a new Consumer for one or more topics.
 
Method Summary
 void addSubscription(Subscription subscription)
          Add a subscription.
 java.lang.String getClientID()
          Returns the client identifier.
 java.lang.String getName()
          Returns the consumer name.
 java.util.List getSubscriptions()
          Returns the subscriptions.
 boolean isQueueConsumer()
          Determines if this is a queue consumer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Consumer

public Consumer(org.exolab.jms.client.JmsQueue queue)
Construct a new Consumer for a queue.
Parameters:
queue - the queue

Consumer

public Consumer(java.lang.String name,
                java.lang.String clientId)
Construct a new Consumer for one or more topics.
Parameters:
name - the name of the consumer
clientId - the client identifier. May be null
Method Detail

getName

public java.lang.String getName()
Returns the consumer name. If this is a queue consumer, the name is the same as the queue being consumed.
Returns:
the name of the consumer

getClientID

public java.lang.String getClientID()
Returns the client identifier. If the consumer represents a queue, then the client identifier is always null.
Returns:
the client identifier. May be null

isQueueConsumer

public boolean isQueueConsumer()
Determines if this is a queue consumer.
Returns:
true if this is a queue consumer; otherwise false

addSubscription

public void addSubscription(Subscription subscription)
Add a subscription.
Parameters:
subscription - the subscription

getSubscriptions

public java.util.List getSubscriptions()
Returns the subscriptions.
Returns:
a list of Subscription instances


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.