1 /*------------------------------------------------------------------------------
 2 Name:      I_Callback.java
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 Comment:   Helper to easy get the callback messages
 6 Version:   $Id: I_Callback.java 15494 2006-09-10 10:59:27Z ruff $
 7 ------------------------------------------------------------------------------*/
 8 package org.xmlBlaster.client;
 9 
10 import org.xmlBlaster.util.XmlBlasterException;
11 import org.xmlBlaster.client.key.UpdateKey;
12 import org.xmlBlaster.client.qos.UpdateQos;
13 
14 /**
15  * Interface to receive asynchronously send callback messages from xmlBlaster. 
16  * <p>
17  * Please implement this to receive your messages.
18  *
19  * @version $Revision: 1.13 $
20  * @author <a href="mailto:xmlBlaster@marcelruff.info">Marcel Ruff</a>.
21  * @see <a href="http://www.xmlBlaster.org/xmlBlaster/demo/HelloWorld3.java.html">HelloWorld8.java</a>
22  */
23 public interface I_Callback
24 {
25    /**
26     * This is the callback method invoked from I_XmlBlasterAccess
27     * informing the client in an asynchronous mode about a new message.
28     * <p />
29     * So you should implement in your client code the I_Callback interface -
30     * suppling the update() method where you can do with the message whatever you want.
31     * <p />
32     * The raw protocol driver specific update() method (e.g. CORBA-BlasterCallback.update())
33     * is unpacked and for each arrived message this update is called.
34     *
35     * @param cbSessionId The session ID specified by the client which registered the callback.
36     *                    You can specify a cbSessionId during connection (with ConnectQos)
37     *                    and this is bounced back here so you can authenticate the message.
38     * @param updateKey   The arrived key containing the topic name
39     * @param content     The arrived message content. This is your payload.
40     * @param qos         Quality of Service of the MsgUnit
41     * @see org.xmlBlaster.client.I_XmlBlasterAccess
42     */
43    public String update(String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos) throws XmlBlasterException;
44 }


syntax highlighted by Code2HTML, v. 0.9.1