1 /*------------------------------------------------------------------------------
 2 Name:      I_CallbackServer.java
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 Comment:   Interface for clients, used by xmlBlaster to send messages back
 6 ------------------------------------------------------------------------------*/
 7 package org.xmlBlaster.client.protocol;
 8 
 9 import org.xmlBlaster.util.Global;
10 import org.xmlBlaster.util.XmlBlasterException;
11 import org.xmlBlaster.util.plugin.I_Plugin;
12 import org.xmlBlaster.util.qos.address.CallbackAddress;
13 
14 
15 /**
16  * This is the client callback interface to xmlBlaster.
17  * <p />
18  * All callback protocol drivers are accessed through these methods.
19  * We need it to decouple the protocol specific stuff
20  * (like RemoteException from RMI or CORBA exceptions) from
21  * our java client code.
22  * <p />
23  * Note that you don't need this code, you can access xmlBlaster
24  * with your own lowlevel RMI or CORBA coding as well.
25  *
26  * @see org.xmlBlaster.client.protocol.I_XmlBlasterConnection
27  * @author <a href="mailto:xmlBlaster@marcelruff.info">Marcel Ruff</a>.
28  */
29 public interface I_CallbackServer extends I_Plugin
30 {
31    /**
32     * Initialize and start the callback server. 
33     * <p />
34     * This is guaranteed to be invoked after the default constructor.
35     * <p>
36     * NOTE: The plugin needs to set callbackAddress.setRawAddress(addr) on success
37     * which is for example "et@mars.universe" or "http://myserver:8080/xmlrpc"
38     * </p>
39     * @param glob The global handle with your environment settings
40     * @param name The login name of the client, for logging only
41     * @param callbackAddress The address configuration of this callback server
42     * @param client Your implementation to receive the callback messages from xmlBlaster
43     */
44    public void initialize(Global glob, String name, CallbackAddress callbackAddress, I_CallbackExtended client) throws XmlBlasterException;
45 
46    /**
47     * Returns the 'well known' protocol type. 
48     * @return E.g. "RMI", "SOCKET", "XMLRPC"
49     */
50    public String getCbProtocol();
51    
52    /**
53     * Returns the current callback address. 
54     * @return "rmi://develop.MarcelRuff.info:1099/xmlBlasterCB", "127.128.2.1:7607", "http://XMLRPC"
55     *         or null if not known
56     */
57    public String getCbAddress() throws XmlBlasterException;
58    
59    /**
60     * Stop the server
61     */
62    public void shutdown() throws XmlBlasterException;
63 }


syntax highlighted by Code2HTML, v. 0.9.1