xmlBlaster 1.6.2 client API

org.xmlBlaster.client
Interface XmlBlasterAccessMBean

All Known Implementing Classes:
XmlBlasterAccess

public interface XmlBlasterAccessMBean

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


Method Summary
 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[] 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

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

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

getLoginName

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

Returns:
For example "joe"

isCallbackConfigured

public 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

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

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

getPublicSessionId

public long getPublicSessionId()
Get the sessions public session id.

Returns:
For example -1

getConnectionQueueId

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

Returns:
For example "connection:SUB17692784598"

getLoginDate

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

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

refreshSession

public 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

public long getUptime()
Uptime in seconds


getNumPublish

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


getNumSubscribe

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


getNumUnSubscribe

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


getNumGet

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


getNumErase

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


getNumUpdateOneway

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


getNumUpdate

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


getConnectionQueueNumMsgs

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


getConnectionQueueMaxMsgs

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


getPingRoundTripDelay

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

Returns:
Returns the pingRoundTripDelay.

getRoundTripDelay

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

Returns:
Returns the roundTripDelay.

invokePublish

public 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

public 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

public 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

public 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

public 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

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


getDispatcherActive

public boolean getDispatcherActive()
Access the dispatcher state.

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

getServerNodeId

public 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

public 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

public 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

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

Returns:
For example "1.0.4"

getRevisionNumber

public 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

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

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

getBuildJavaVendor

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

Returns:
For example "Sun Microsystems Inc."

getBuildJavaVersion

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

Returns:
For example "1.5.0"

xmlBlaster 1.6.2 client API

Copyright © 1999-2007 The xmlBlaster.org contributers.