xmlBlaster 2.2.0 client API

Class ClientSub

  extended by javaclients.ClientSub
All Implemented Interfaces:

public class ClientSub
extends java.lang.Object
implements I_Callback

This client tests the method subscribe() with a later publish() with XPath query.
The subscribe() should be recognized for this later arriving publish().

This demo uses the I_XmlBlasterAccess helper class, which hides the raw CORBA/RMI/XMLRPC nastiness.
I_XmlBlasterAccesss hides how to find the xmlBlaster server (see I_XmlBlasterAccess API).
I_XmlBlasterAccess installs a callback server (for CORBA,RMI or XMLRPC) for you and informs you about asynchronous callbacks using the I_Callback interface (method update() see below).

If you want to know step by step what happens with CORBA, study the corba/ClientRaw.java example. Here we use all available Java helper classes.

Invoke examples:

    java -cp ../../lib/xmlBlaster.jar javaclients.ClientSub

    java javaclients.ClientSub -session.name Jeff -dispatch/connection/protocol RMI

    java javaclients.ClientSub -help

Field Summary
static long elapsed
static long startTime
Constructor Summary
ClientSub(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

Field Detail


public static long startTime


public static long elapsed
Constructor Detail


public ClientSub(Global glob)
Method Detail


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
cbSessionId - The session ID specified by the client which registered the callback
updateKey - The arrived key
content - The arrived message content
qos - Quality of Service of the MsgUnit
See Also:
I_Callback.update(String, UpdateKey, byte[], UpdateQos)


public static void main(java.lang.String[] args)

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.