javaclients
Class ClientXml
java.lang.Object
javaclients.ClientXml
- All Implemented Interfaces:
- I_Callback
public class ClientXml
- extends java.lang.Object
- implements I_Callback
This client tests the method subscribe()/publish() with XML syntax key
and XPath query using the DefaultCallback implementation.
It is a nice example using the DefaultCallback implementation from I_XmlBlasterAccess.java
which calls the update() method using I_Callback interface when messages arrive.
Have a look into the testsuite for other possibilities.
Invoke examples:
java javaclients.ClientXml
java javaclients.ClientXml -loginName "Jeff"
Field Summary |
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
Constructor Summary |
ClientXml(java.lang.String[] args)
|
Method Summary |
static void |
main(java.lang.String[] args)
|
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
This is the callback method invoked from xmlBlaster
delivering us a new asynchronous message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ME
private static java.lang.String ME
log
private static java.util.logging.Logger log
ClientXml
public ClientXml(java.lang.String[] args)
update
public java.lang.String update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
- This is the callback method invoked from xmlBlaster
delivering us a new asynchronous message.
- Specified by:
update
in interface I_Callback
- Parameters:
cbSessionId
- The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updateKey
- The arrived key containing the topic namecontent
- The arrived message content. This is your payload.- See Also:
I_Callback.update(String, UpdateKey, byte[], UpdateQos)
main
public static void main(java.lang.String[] args)
Copyright © 1999-2014 The xmlBlaster.org contributers.