站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 messaging API Documentation 英文版文档

Subscription (JBoss Messaging API) - JBoss 4.0.1 sp1 messaging API Documentation 英文版文档


org.jboss.mq
Class Subscription

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

public class Subscription
extends Object
implements 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.

Version:
$Revision: 1.12 $
Author:
Hiram Chirino (Cojonudo14@hotmail.com), David Maplesden (David.Maplesden@orion.co.nz), Adrian Brock
See Also:
Serialized Form

Field Summary
 Object clientConsumer
          The client consumer
 ConnectionToken connectionToken
          The connection token
 SpyDestination destination
          The queue we want to subscribe to.
 boolean destroyDurableSubscription
          Should this message destroy the subscription?
 String messageSelector
          The selector which will filter out messages.
 boolean noLocal
          Topics might not want locally produced messages.
 Selector 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 header)
          Determines the consumer would accept the message.
 Selector getSelector()
          Determines the consumer would accept the message.
 Subscription myClone()
          Clone the subscription
 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 destination
The queue we want to subscribe to.


messageSelector

public 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 selector
The message selector


connectionToken

public transient ConnectionToken connectionToken
The connection token


clientConsumer

public transient Object clientConsumer
The client consumer

Constructor Detail

Subscription

public Subscription()
Method Detail

getSelector

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

Returns:
the selector
Throws:
javax.jms.InvalidSelectorException - for an invalid selector

accepts

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

Parameters:
header - the message header
Returns:
true when accepted, false otherwise
Throws:
javax.jms.JMSException - for any error

myClone

public Subscription myClone()
Clone the subscription

Returns:
the cloned subscription

toString

public String toString()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.