xmlBlaster 2.2.0 client API

javaclients
Class ClientSubDispatch

java.lang.Object
  extended by 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
 


Constructor Summary
ClientSubDispatch(Global glob)
           
 
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
 

Constructor Detail

ClientSubDispatch

public ClientSubDispatch(Global glob)
Method Detail

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 name
content - 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)

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.