javaclients
Class ClientSubDispatch
java.lang.Object
javaclients.ClientSubDispatch
- All Implemented Interfaces:
- I_Callback
public class ClientSubDispatch
- extends java.lang.Object
- implements I_Callback
This client demonstrates the method subscribe() with a later publish().
We use a subscribe variant, where for every subscribe we define a
specialized update method.
Like this not all callback messages arrive in a centralized update()
with the need to look into them and decide why the arrived.
This demo uses the I_XmlBlasterAccess helper class, which hides the raw
CORBA/RMI/XMLRPC nastiness and allows this client side dispatching.
Invoke examples:
java -cp ../../lib/xmlBlaster.jar javaclients.ClientSubDispatch
java javaclients.ClientSubDispatch -loginName Jeff -dispatch/connection/protocol RMI
java javaclients.ClientSubDispatch -help
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 |
ClientSubDispatch
public ClientSubDispatch(Global glob)
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.