xmlBlaster 1.6.2 API

org.xmlBlaster.engine.admin
Interface I_AdminTopic

All Superinterfaces:
I_AdminUsage
All Known Subinterfaces:
TopicHandlerMBean
All Known Implementing Classes:
TopicHandler

public interface I_AdminTopic
extends I_AdminUsage

Declares available methods of a topic for administration.

JMX, SNMP or telnet tools can access only the here declared properties.
This interface is implemented by TopicHandler.java, delivering the meat.

Since:
1.0.4
Author:
xmlBlaster@marcelruff.info

Method Summary
 java.lang.String eraseTopic()
          Invoke operation to erase the topic
 java.lang.String getContentMime()
          Access the topics content mime.
 java.lang.String getContentMimeExtended()
          Access the topics content mime extended.
 long getDestroyDelay()
          The configured delay in milli seconds until the topic is destroyed in state UNREFERENCED.
 boolean getDomTreeExists()
          Check if this topic is query-able by XPath.
 boolean getExactSubscribersExist()
           
 MsgUnit[] getHistoryQueueEntries(java.lang.String querySpec)
          Query the history queue, can be peeking or consuming.
 java.lang.String getId()
          The unique identifier of this topic.
 long getNumOfCacheEntries()
          Get number of queued history messages which are in the cache.
 long getNumOfHistoryEntries()
          Get number of queued history messages.
 int getNumSubscribers()
          Access the number of registered subscribers on this topic.
 java.lang.String getStateStr()
          Get the life cycle status of this topic.
 java.lang.String[] getSubscribers()
          Get a list of all subscribers of this topic.
 java.lang.String getTopicXml()
          Access the topics xml key.
 boolean getTopicXmlExists()
           
 java.lang.String getUniqueKey()
          Access the topic key oid.
 java.lang.String[] peekHistoryMessages(int numOfEntries)
          Peek messages from history queue, they are not removed.
 java.lang.String[] peekHistoryMessagesToFile(int numOfEntries, java.lang.String path)
          Peek messages from history queue and dump them to a file, they are not removed.
 java.lang.String toXml()
          Get status dump.
 java.lang.String[] unSubscribeAll(java.lang.String qos)
          Invoke operation to unSubscribe all clients.
 java.lang.String[] unSubscribeByIndex(int index, java.lang.String qos)
          Invoke operation to unSubscribe one client by index of getSubscribers() listed.
 java.lang.String[] unSubscribeBySessionName(java.lang.String sessionName, java.lang.String qos)
          Invoke operation to unSubscribe one client by index of getSubscribers() listed.
 
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminUsage
getUsageUrl, setUsageUrl, usage
 

Method Detail

getId

public java.lang.String getId()
The unique identifier of this topic.

Returns:
e.g. "/node/heron/topic/Hello"

getDomTreeExists

public boolean getDomTreeExists()
Check if this topic is query-able by XPath.

Returns:
true if the DOM entry exists

getTopicXmlExists

public boolean getTopicXmlExists()

getTopicXml

public java.lang.String getTopicXml()
                             throws XmlBlasterException
Access the topics xml key.

Returns:
The XML string
Throws:
XmlBlasterException

getUniqueKey

public java.lang.String getUniqueKey()
Access the topic key oid.

Returns:
Value of <key oid=''/>

getContentMime

public java.lang.String getContentMime()
Access the topics content mime.

Returns:
Value of <key contentMime=''/>

getContentMimeExtended

public java.lang.String getContentMimeExtended()
Access the topics content mime extended.

Returns:
Value of <key contentMimeExtended=''/>

getNumSubscribers

public int getNumSubscribers()
Access the number of registered subscribers on this topic.

Returns:
Number of subscriptions

getExactSubscribersExist

public boolean getExactSubscribersExist()

getNumOfHistoryEntries

public long getNumOfHistoryEntries()
Get number of queued history messages.

Returns:
Number of messages

getNumOfCacheEntries

public long getNumOfCacheEntries()
Get number of queued history messages which are in the cache.

Returns:
Number of cached messages

getStateStr

public java.lang.String getStateStr()
Get the life cycle status of this topic.

Returns:
"ALIVE" or "DEAD" etc.

getSubscribers

public java.lang.String[] getSubscribers()
Get a list of all subscribers of this topic.

Returns:
array with absolute session names

unSubscribeByIndex

public java.lang.String[] unSubscribeByIndex(int index,
                                             java.lang.String qos)
                                      throws XmlBlasterException
Invoke operation to unSubscribe one client by index of getSubscribers() listed. Note: The subscriber does not get any notification that his subscription is lost.

Parameters:
index - 0 will kill the first listed subscribing client, 1 the second and so forth
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
XmlBlasterException

unSubscribeBySessionName

public java.lang.String[] unSubscribeBySessionName(java.lang.String sessionName,
                                                   java.lang.String qos)
                                            throws XmlBlasterException
Invoke operation to unSubscribe one client by index of getSubscribers() listed. Note: The subscriber does not get any notification that his subscription is lost.

Parameters:
sessionName - You can specify a relative name "client/joe/1" or an absolute name "/node/heron/client/joe/1"
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
XmlBlasterException

unSubscribeAll

public java.lang.String[] unSubscribeAll(java.lang.String qos)
                                  throws XmlBlasterException
Invoke operation to unSubscribe all clients. Note: The subscribers don't get any notification that their subscription is lost.

Parameters:
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
XmlBlasterException

toXml

public java.lang.String toXml()
Get status dump.


peekHistoryMessages

public java.lang.String[] peekHistoryMessages(int numOfEntries)
                                       throws XmlBlasterException
Peek messages from history queue, they are not removed.

Parameters:
numOfEntries - The number of messages to peek, the newest first
Returns:
The dump of the messages
Throws:
XmlBlasterException

peekHistoryMessagesToFile

public java.lang.String[] peekHistoryMessagesToFile(int numOfEntries,
                                                    java.lang.String path)
                                             throws java.lang.Exception
Peek messages from history queue and dump them to a file, they are not removed.

Parameters:
numOfEntries - The number of messages to peek, taken from the front
path - The path to dump the messages to, it is automatically created if missing.
Returns:
The absolute file names dumped
Throws:
java.lang.Exception

getHistoryQueueEntries

public MsgUnit[] getHistoryQueueEntries(java.lang.String querySpec)
                                 throws XmlBlasterException
Query the history queue, can be peeking or consuming.

Parameters:
querySpec - Can be configured to be consuming
Throws:
XmlBlasterException
See Also:
The engine.qos.queryspec.QueueQuery requirement

eraseTopic

public java.lang.String eraseTopic()
                            throws XmlBlasterException
Invoke operation to erase the topic

Returns:
A status message
Throws:
XmlBlasterException

getDestroyDelay

public long getDestroyDelay()
The configured delay in milli seconds until the topic is destroyed in state UNREFERENCED.

Returns:
milli seconds

xmlBlaster 1.6.2 API

Copyright © 1999-2007 The xmlBlaster.org contributers.