xmlBlaster 2.2.0 API

org.xmlBlaster.client
Interface XmlBlasterAccessMBean

All Known Implementing Classes:
XmlBlasterAccess, XmlScriptInterpreterTest.TestAccessor

public interface XmlBlasterAccessMBean

Export methods for JMX to monitor and control the java client connection.


Method Summary
 java.lang.String disconnect(java.lang.String disconnectQos)
           
 boolean forcePollingForTesting()
           
 java.lang.String getBuildJavaVendor()
          The java vendor of the compiler.
 java.lang.String getBuildJavaVersion()
          The compiler java version.
 java.lang.String getBuildTimestamp()
          Returns the date when xmlBlaster client library was compiled.
 java.lang.String getConnectionQueueId()
          Access the unique id of my client side queue.
 long getConnectionQueueMaxMsgs()
          How many messages are max.
 long getConnectionQueueNumMsgs()
          How many messages are in this client side queue
 java.lang.String getConnectionState()
          Get the connection state.
 boolean getDispatcherActive()
          Access the dispatcher state.
 java.lang.String getId()
          A unique name for this client, for logging only
 java.lang.String getLoginDate()
          Get date when client logged in.
 java.lang.String getLoginName()
          Get the login name.
 long getNumErase()
          How many subscribe requests where send by this clients login session
 long getNumGet()
          How many get requests where send by this clients login session
 long getNumPublish()
          How many messages where send by this clients login session
 long getNumSubscribe()
          How many subscribe requests where send by this clients login session
 long getNumUnSubscribe()
          How many unsubscribe requests where send by this clients login session
 long getNumUpdate()
          How many messages where received by this clients login session
 long getNumUpdateOneway()
          How many oneway messages where received by this clients login session
 long getPingRoundTripDelay()
          Measures the round trip for the last ping() invocation in milli seconds.
 long getPublicSessionId()
          Get the sessions public session id.
 java.lang.String getRevisionNumber()
          Returns the xmlBlaster client library SVN version control revision number.
 long getRoundTripDelay()
          Measures the round trip for the last remote method invocation in milli seconds.
 java.lang.String getServerNodeId()
          The cluster node id (name) to which we want to connect.
 long getUptime()
          Uptime in seconds
 java.lang.String getVersion()
          Get the xmlBlaster client library version number.
 java.lang.String[] invokeErase(java.lang.String url, java.lang.String qos)
          Invoke operation to erase() one/many topics.
 java.lang.String[] invokeGet(java.lang.String url, java.lang.String qos)
          Invoke operation to get() one/many topics.
 java.lang.String invokePublish(java.lang.String key, java.lang.String content, java.lang.String qos)
          Publish a message.
 java.lang.String invokeSubscribe(java.lang.String url, java.lang.String qos)
          Invoke operation to subscribe the topic, given by its oid
 java.lang.String[] invokeUnSubscribe(java.lang.String url, java.lang.String qos)
          Invoke operation to unSubscribe one/many topics.
 boolean isCallbackConfigured()
          Check if a callback was configured, if client has passed a callback address on connect.
 java.lang.String leaveServer()
           
 java.lang.String[] peekClientMessages(int numOfEntries)
          Peek messages from client queue, they are not removed
 java.lang.String[] peekClientMessagesToFile(int numOfEntries, java.lang.String path)
          Peek messages from client queue and dump them to a file, they are not removed.
 void refreshSession()
          Send an event to xmlBlaster to refresh the login session life time.
 void setDispatcherActive(boolean dispatcherActive)
          Activates/inhibits the dispatch of messages to this client.
 

Method Detail

getId

java.lang.String getId()
A unique name for this client, for logging only

Returns:
e.g. "/node/heron/client/joe/3"

getLoginName

java.lang.String getLoginName()
Get the login name.

Returns:
For example "joe"

isCallbackConfigured

boolean isCallbackConfigured()
Check if a callback was configured, if client has passed a callback address on connect.

Returns:
true if a callback is configured

getConnectionState

java.lang.String getConnectionState()
Get the connection state.

Returns:
"UNDEF", "ALIVE", "POLLING", "DEAD"

getPublicSessionId

long getPublicSessionId()
Get the sessions public session id.

Returns:
For example -1

getConnectionQueueId

java.lang.String getConnectionQueueId()
Access the unique id of my client side queue.

Returns:
For example "connection:SUB17692784598"

getLoginDate

java.lang.String getLoginDate()
Get date when client logged in.

Returns:
For example "2005-07-25 12:34:16.79"

refreshSession

void refreshSession()
                    throws XmlBlasterException
Send an event to xmlBlaster to refresh the login session life time.

Throws:
XmlBlasterException - like ErrorCode.USER_NOT_CONNECTED and others
See Also:
session requirement

getUptime

long getUptime()
Uptime in seconds


getNumPublish

long getNumPublish()
How many messages where send by this clients login session


getNumSubscribe

long getNumSubscribe()
How many subscribe requests where send by this clients login session


getNumUnSubscribe

long getNumUnSubscribe()
How many unsubscribe requests where send by this clients login session


getNumGet

long getNumGet()
How many get requests where send by this clients login session


getNumErase

long getNumErase()
How many subscribe requests where send by this clients login session


getNumUpdateOneway

long getNumUpdateOneway()
How many oneway messages where received by this clients login session


getNumUpdate

long getNumUpdate()
How many messages where received by this clients login session


getConnectionQueueNumMsgs

long getConnectionQueueNumMsgs()
How many messages are in this client side queue


getConnectionQueueMaxMsgs

long getConnectionQueueMaxMsgs()
How many messages are max. allowed in this client side queue


getPingRoundTripDelay

long getPingRoundTripDelay()
Measures the round trip for the last ping() invocation in milli seconds.

Returns:
Returns the pingRoundTripDelay.

getRoundTripDelay

long getRoundTripDelay()
Measures the round trip for the last remote method invocation in milli seconds. For example update(), publish(), subscribe()

Returns:
Returns the roundTripDelay.

forcePollingForTesting

boolean forcePollingForTesting()

invokePublish

java.lang.String invokePublish(java.lang.String key,
                               java.lang.String content,
                               java.lang.String qos)
                               throws java.lang.Exception
Publish a message.

Parameters:
key - The publish key (e.g. <key oid="Hello"><South/></key>)
qos - The qos XML string (e.g. "" or "<qos><persistent/></qos>")
Returns:
The status string
Throws:
java.lang.Exception

invokeUnSubscribe

java.lang.String[] invokeUnSubscribe(java.lang.String url,
                                     java.lang.String qos)
                                     throws java.lang.Exception
Invoke operation to unSubscribe one/many topics.

Parameters:
url - The topic oid/xpath to unSubscribe (e.g. "Hello" or "xpath://key")
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
java.lang.Exception

invokeSubscribe

java.lang.String invokeSubscribe(java.lang.String url,
                                 java.lang.String qos)
                                 throws java.lang.Exception
Invoke operation to subscribe the topic, given by its oid

Parameters:
url - The topic oid/xpath to subscribe (e.g. "Hello" or "xpath://key")
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
java.lang.Exception

invokeGet

java.lang.String[] invokeGet(java.lang.String url,
                             java.lang.String qos)
                             throws java.lang.Exception
Invoke operation to get() one/many topics.

Parameters:
url - The topic oid/xpath to retrieve (e.g. "Hello" or "xpath://key")
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
java.lang.Exception

invokeErase

java.lang.String[] invokeErase(java.lang.String url,
                               java.lang.String qos)
                               throws java.lang.Exception
Invoke operation to erase() one/many topics.

Parameters:
url - The topic oid/xpath to erase (e.g. "Hello" or "xpath://key")
qos - The qos XML string (e.g. "" or "")
Returns:
The status string
Throws:
java.lang.Exception

setDispatcherActive

void setDispatcherActive(boolean dispatcherActive)
Activates/inhibits the dispatch of messages to this client.


getDispatcherActive

boolean getDispatcherActive()
Access the dispatcher state.

Returns:
true if the dispatcher is currently able to dispatch asyncronously

getServerNodeId

java.lang.String getServerNodeId()
The cluster node id (name) to which we want to connect.

Needed only for nicer logging when running in a cluster.
Is configurable with "-server.node.id golan"

Returns:
e.g. "golan", defaults to "xmlBlaster"

peekClientMessages

java.lang.String[] peekClientMessages(int numOfEntries)
                                      throws java.lang.Exception
Peek messages from client queue, they are not removed

Parameters:
numOfEntries - The number of messages to peek, taken from the front
Returns:
The dump of the messages
Throws:
java.lang.Exception

peekClientMessagesToFile

java.lang.String[] peekClientMessagesToFile(int numOfEntries,
                                            java.lang.String path)
                                            throws java.lang.Exception
Peek messages from client 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

getVersion

java.lang.String getVersion()
Get the xmlBlaster client library version number.

Returns:
For example "1.0.4"

getRevisionNumber

java.lang.String getRevisionNumber()
Returns the xmlBlaster client library SVN version control revision number.

Returns:
The subversion revision number of the monitored instance, for example "13593"

getBuildTimestamp

java.lang.String getBuildTimestamp()
Returns the date when xmlBlaster client library was compiled.

Returns:
For example "07/28/2005 03:47 PM"

getBuildJavaVendor

java.lang.String getBuildJavaVendor()
The java vendor of the compiler.

Returns:
For example "Sun Microsystems Inc."

getBuildJavaVersion

java.lang.String getBuildJavaVersion()
The compiler java version.

Returns:
For example "1.5.0"

leaveServer

java.lang.String leaveServer()

disconnect

java.lang.String disconnect(java.lang.String disconnectQos)

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.