org.apache.geronimo.console.core.jms
Class TopicBrowserGBean

java.lang.Object
  extended by org.apache.geronimo.console.core.jms.TopicBrowserGBean
All Implemented Interfaces:
Runnable, GBeanLifecycle

public class TopicBrowserGBean
extends Object
implements GBeanLifecycle, Runnable


Field Summary
static GBeanInfo GBEAN_INFO
           
 
Constructor Summary
TopicBrowserGBean(String subscriberName, AdminObjectWrapper connectionFactoryWrapper, AdminObjectWrapper topicWrapper)
           
 
Method Summary
 void doFail()
          Fails the GBean.
 void doStart()
          Start the connection on a topic and add a durable subscription.
 void doStop()
          Close the connection and unregister durable subscription.
static GBeanInfo getGBeanInfo()
           
 List getMessages()
          Get all the messages since the last call to getMessages().
 void run()
           
 void unsubscribe()
          Remove a durable subscription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

TopicBrowserGBean

public TopicBrowserGBean(String subscriberName,
                         AdminObjectWrapper connectionFactoryWrapper,
                         AdminObjectWrapper topicWrapper)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

doStart

public void doStart()
             throws WaitingException,
                    Exception
Start the connection on a topic and add a durable subscription.

Specified by:
doStart in interface GBeanLifecycle
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state
WaitingException
See Also:
GBeanLifecycle.doStart()

doStop

public void doStop()
            throws WaitingException,
                   Exception
Close the connection and unregister durable subscription.

Specified by:
doStop in interface GBeanLifecycle
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state
WaitingException
See Also:
GBeanLifecycle.doStop()

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle

getMessages

public List getMessages()
                 throws Exception
Get all the messages since the last call to getMessages(). If this is the first call returns all the messages sent to the Topic

Returns:
all the messages since the last call to getMessages() or all the messages sent to the topic if this is there was no previous call.
Throws:
Exception

unsubscribe

public void unsubscribe()
                 throws Exception
Remove a durable subscription.

Throws:
Exception

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.