org.jboss.mq
Class Subscription

java.lang.Object
  extended byorg.jboss.mq.Subscription
All Implemented Interfaces:
java.io.Serializable

public class Subscription
extends java.lang.Object
implements java.io.Serializable

This class contains all the data needed to for a the provider to to determine if a message can be routed to a consumer.

See Also:
Serialized Form

Field Summary
 java.lang.Object clientConsumer
          The client consumer
 ConnectionToken (src) connectionToken
          The connection token
 SpyDestination (src) destination
          The queue we want to subscribe to.
 boolean destroyDurableSubscription
          Should this message destroy the subscription?
 java.lang.String messageSelector
          The selector which will filter out messages.
 boolean noLocal
          Topics might not want locally produced messages.
 Selector (src) selector
          The message selector
 int subscriptionId
          This gets set to a unique value at the SpyConnection.
 
Constructor Summary
Subscription()
           
 
Method Summary
 boolean accepts(SpyMessage.Header (src)  header)
          Determines the consumer would accept the message.
 Selector (src) getSelector()
          Determines the consumer would accept the message.
 Subscription (src) myClone()
          Clone the subscription
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subscriptionId

public int subscriptionId
This gets set to a unique value at the SpyConnection.


destination

public SpyDestination (src)  destination
The queue we want to subscribe to.


messageSelector

public java.lang.String messageSelector
The selector which will filter out messages.


destroyDurableSubscription

public boolean destroyDurableSubscription
Should this message destroy the subscription?


noLocal

public boolean noLocal
Topics might not want locally produced messages.


selector

public transient Selector (src)  selector
The message selector


connectionToken

public transient ConnectionToken (src)  connectionToken
The connection token


clientConsumer

public transient java.lang.Object clientConsumer
The client consumer

Constructor Detail

Subscription

public Subscription()
Method Detail

getSelector

public Selector (src)  getSelector()
                     throws InvalidSelectorException (src) 
Determines the consumer would accept the message.

Returns:
the selector
Throws:
InvalidSelectorException (src) - for an invalid selector

accepts

public boolean accepts(SpyMessage.Header (src)  header)
                throws JMSException (src) 
Determines the consumer would accept the message.

Parameters:
header - the message header
Returns:
true when accepted, false otherwise
Throws:
JMSException (src) - for any error

myClone

public Subscription (src)  myClone()
Clone the subscription

Returns:
the cloned subscription

toString

public java.lang.String toString()