1 /*------------------------------------------------------------------------------
2 Name: I_XmlRpcCallback.java
3 Project: xmlBlaster.org
4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
5 Comment: Helper to easy get the xml-rpc callback messages
6 Version: $Id: I_CallbackExtended.java 16941 2008-05-17 09:58:05Z ruff $
7 ------------------------------------------------------------------------------*/
8 package org.xmlBlaster.client.protocol;
9
10 import org.xmlBlaster.client.I_Callback;
11 import org.xmlBlaster.client.I_CallbackRaw;
12 import org.xmlBlaster.util.XmlBlasterException;
13
14 /**
15 * This is a little helper interface which which extends the I_Callback
16 * and I_CallbackRaw interface to become suited for protocols like xml-rpc.
17 * <p>
18 * The class implementing this interface needs to support
19 * the 3 update() variants, so that the protocol drivers
20 * can choose the update() they like most.
21 *
22 * @version $Revision: 1.7 $
23 * @author <a href="mailto:michele@laghi.eu">Michele Laghi</a>
24 */
25 public interface I_CallbackExtended extends I_Callback, I_CallbackRaw
26 {
27 /**
28 * This is the callback method invoked when using certain callback protocols
29 * (for example xml-rpc) which informs the client in an asynchronous
30 * mode about a new message.
31 * <p />
32 * You can implement this interface in your client. Note that when doing
33 * so, you need to implement all update() methods defined (remember the
34 * one defined in I_Callback/I_CallbackRaw).
35 * <p />
36 * The implementation of the update method with
37 * the signature specified in this interface must parse the string literals
38 * passed in the argument list and call the other update method (the one
39 * with the signature defined in I_Callback).
40 *
41 * @param cbSessionId The session ID specified by the client which registered the callback
42 * @param updateKeyLiteral The arrived key (as an xml-string)
43 * @param content The arrived message content
44 * @param updateQosLiteral Quality of Service of the MsgUnitRaw
45 * (as an xml-string)
46 * @see I_Callback
47 * @see AbstractCallbackExtended
48 */
49 public String update(String cbSessionId, String updateKeyLiteral, byte[] content,
50 String updateQosLiteral) throws XmlBlasterException;
51
52 /**
53 * The oneway variant without a return value or exception
54 */
55 public void updateOneway(String cbSessionId, String updateKeyLiteral, byte[] content, String updateQosLiteral);
56
57 /**
58 * For example called by socket layer on EOF
59 * @param xmlBlasterException
60 */
61 public void lostConnection(XmlBlasterException xmlBlasterException);
62 }
syntax highlighted by Code2HTML, v. 0.9.1