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


syntax highlighted by Code2HTML, v. 0.9.1