org.jboss.jms.server.destination
Class Topic

java.lang.Object
  extended byServiceMBeanSupport
      extended byorg.jboss.jms.server.destination.DestinationServiceSupport
          extended byorg.jboss.jms.server.destination.Topic

public class Topic
extends DestinationServiceSupport

A deployable JBoss Messaging topic.

Version:
$Revision: 1.13 $ $Id: Topic.java,v 1.13 2006/04/13 19:43:05 timfox Exp $
Author:
Ovidiu Feodorov, Tim Fox, Alex Fu
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jms.server.destination.DestinationServiceSupport
cm, dm, jndiName, name, securityConfig, serverPeerObjectName, sm, started
 
Constructor Summary
Topic()
           
Topic(boolean createProgrammatically)
           
 
Method Summary
protected  java.util.List getMessagesFromDurableSub(Topic t, java.lang.String name, java.lang.String clientID, java.lang.String selector)
           
 java.util.List getMessagesFromNonDurableSub(Topic t, long channelID, java.lang.String selector)
           
protected  java.lang.String getSubscriptionsAsText(Topic t, boolean durable)
           
protected  boolean isQueue()
           
 java.util.List listMessagesDurableSub(java.lang.String name, java.lang.String clientID, java.lang.String selector)
          Get messages from a durable subscription.
 java.util.List listMessagesNonDurableSub(long channelID, java.lang.String selector)
          Get messages from a non-durable subscription.
 java.lang.String listSubscriptionsAsText()
          Returns a human readable list containing the names of current subscriptions.
 java.lang.String listSubscriptionsAsText(boolean durable)
          Returns a human readable list containing the names of current subscriptions.
 void removeAllMessages()
          Remove all messages from subscription's storage.
 int subscriptionCount()
          All subscription count
 int subscriptionCount(boolean durable)
          Durable/nondurable subscription count
 
Methods inherited from class org.jboss.jms.server.destination.DestinationServiceSupport
getDownCacheSize, getFullSize, getJNDIName, getName, getPageSize, getSecurityConfig, getServerPeer, isCreatedProgrammatically, setDownCacheSize, setFullSize, setJNDIName, setPageSize, setSecurityConfig, setServerPeer, startService, stopService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Topic

public Topic()

Topic

public Topic(boolean createProgrammatically)
Method Detail

removeAllMessages

public void removeAllMessages()
                       throws JMSException
Remove all messages from subscription's storage.

Throws:
JMSException

subscriptionCount

public int subscriptionCount()
                      throws JMSException
All subscription count

Returns:
all subscription count
Throws:
JMSException

subscriptionCount

public int subscriptionCount(boolean durable)
                      throws JMSException
Durable/nondurable subscription count

Parameters:
durable - If true return durable subscription count. If false return nondurable subscription count.
Returns:
either durable or nondurable subscription count depending on param.
Throws:
JMSException

listSubscriptionsAsText

public java.lang.String listSubscriptionsAsText()
                                         throws JMSException
Returns a human readable list containing the names of current subscriptions.

Returns:
String of subscription list. Never null.
Throws:
JMSException

listSubscriptionsAsText

public java.lang.String listSubscriptionsAsText(boolean durable)
                                         throws JMSException
Returns a human readable list containing the names of current subscriptions.

Parameters:
durable - If true, return durable subscription list. If false, return non-durable subscription list.
Returns:
String of subscription list. Never null.
Throws:
JMSException

listMessagesDurableSub

public java.util.List listMessagesDurableSub(java.lang.String name,
                                             java.lang.String clientID,
                                             java.lang.String selector)
                                      throws JMSException
Get messages from a durable subscription.

Parameters:
name - Subscription name.
clientID - Client ID.
selector - Filter expression.
Returns:
list of javax.jms.Message
Throws:
JMSException
See Also:
ManageableTopic#getMessagesFromDurableSub(String, String, String)

listMessagesNonDurableSub

public java.util.List listMessagesNonDurableSub(long channelID,
                                                java.lang.String selector)
                                         throws JMSException
Get messages from a non-durable subscription.

Parameters:
channelID -
selector - Filter expression.
Returns:
list of javax.jms.Message
Throws:
JMSException
See Also:
ManageableTopic#getMessagesFromNonDurableSub(Long, String)

isQueue

protected boolean isQueue()
Specified by:
isQueue in class DestinationServiceSupport

getSubscriptionsAsText

protected java.lang.String getSubscriptionsAsText(Topic t,
                                                  boolean durable)

getMessagesFromDurableSub

protected java.util.List getMessagesFromDurableSub(Topic t,
                                                   java.lang.String name,
                                                   java.lang.String clientID,
                                                   java.lang.String selector)
                                            throws InvalidSelectorException
Throws:
InvalidSelectorException

getMessagesFromNonDurableSub

public java.util.List getMessagesFromNonDurableSub(Topic t,
                                                   long channelID,
                                                   java.lang.String selector)
                                            throws InvalidSelectorException
Throws:
InvalidSelectorException
See Also:
ManageableTopic#getMessagesFromNonDurableSub(Long, String)


Copyright © 2006 JBoss Inc. All Rights Reserved.