xmlBlaster 2.2.0 API

org.xmlBlaster.client.protocol
Interface I_CallbackServer

All Superinterfaces:
I_Plugin
All Known Implementing Classes:
CorbaCallbackServer, EmailCallbackImpl, LocalCallbackImpl, RmiCallbackServer, SocketCallbackImpl, XmlRpcCallbackServer

public interface I_CallbackServer
extends I_Plugin

This is the client callback interface to xmlBlaster.

All callback protocol drivers are accessed through these methods. We need it to decouple the protocol specific stuff (like RemoteException from RMI or CORBA exceptions) from our java client code.

Note that you don't need this code, you can access xmlBlaster with your own lowlevel RMI or CORBA coding as well.

Author:
Marcel Ruff.
See Also:
I_XmlBlasterConnection

Method Summary
 java.lang.String getCbAddress()
          Returns the current callback address.
 java.lang.String getCbProtocol()
          Returns the 'well known' protocol type.
 void initialize(Global glob, java.lang.String name, CallbackAddress callbackAddress, I_CallbackExtended client)
          Initialize and start the callback server.
 void shutdown()
          Stop the server
 
Methods inherited from interface org.xmlBlaster.util.plugin.I_Plugin
getType, getVersion, init
 

Method Detail

initialize

void initialize(Global glob,
                java.lang.String name,
                CallbackAddress callbackAddress,
                I_CallbackExtended client)
                throws XmlBlasterException
Initialize and start the callback server.

This is guaranteed to be invoked after the default constructor.

NOTE: The plugin needs to set callbackAddress.setRawAddress(addr) on success which is for example "et@mars.universe" or "http://myserver:8080/xmlrpc"

Parameters:
glob - The global handle with your environment settings
name - The login name of the client, for logging only
callbackAddress - The address configuration of this callback server
client - Your implementation to receive the callback messages from xmlBlaster
Throws:
XmlBlasterException

getCbProtocol

java.lang.String getCbProtocol()
Returns the 'well known' protocol type.

Returns:
E.g. "RMI", "SOCKET", "XMLRPC"

getCbAddress

java.lang.String getCbAddress()
                              throws XmlBlasterException
Returns the current callback address.

Returns:
"rmi://develop.MarcelRuff.info:1099/xmlBlasterCB", "127.128.2.1:7607", "http://XMLRPC" or null if not known
Throws:
XmlBlasterException

shutdown

void shutdown()
              throws XmlBlasterException
Stop the server

Specified by:
shutdown in interface I_Plugin
Throws:
XmlBlasterException - if an exception occurs. The exception is handled by the RunLevelManager depending on how the plugin has been configured with the action:

<action do='STOP' onShutdownRunlevel='2' sequence='5' onFail='resource.configuration.pluginFailed'> If onFail is defined to something, the RunLevelManager will stop.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.