xmlBlaster 2.2.0 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
 long clearHistoryQueue()
           
 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

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

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

getDomTreeExists

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

Returns:
true if the DOM entry exists

getTopicXmlExists

boolean getTopicXmlExists()

getTopicXml

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

Returns:
The XML string
Throws:
XmlBlasterException

getUniqueKey

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

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

getContentMime

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

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

getContentMimeExtended

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

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

getNumSubscribers

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

Returns:
Number of subscriptions

getExactSubscribersExist

boolean getExactSubscribersExist()

getNumOfHistoryEntries

long getNumOfHistoryEntries()
Get number of queued history messages.

Returns:
Number of messages

getNumOfCacheEntries

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

Returns:
Number of cached messages

clearHistoryQueue

long clearHistoryQueue()

getStateStr

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

Returns:
"ALIVE" or "DEAD" etc.

getSubscribers

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

Returns:
array with absolute session names

unSubscribeByIndex

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

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

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

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


peekHistoryMessages

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

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

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

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

Returns:
A status message
Throws:
XmlBlasterException

getDestroyDelay

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

Returns:
milli seconds

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.