|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.client.protocol.xmlrpc.XmlRpcCallbackServer
public class XmlRpcCallbackServer
Example for a XmlRpc callback implementation.
You can use this default callback handling with your clients, but if you need other handling of callbacks, take a copy of this Callback implementation and add your own code. The xmlBlaster callback client call the update() from XmlRpcCallbackImpl which delegates it to this update() method.
-dispatch/callback/plugin/xmlrpc/port Specify a port number where xmlrpc callback webserver listens.
Default is port 8081, the port 0 switches this feature off.
-dispatch/callback/plugin/xmlrpc/hostname Specify a hostname where xmlrp callback server runs.
Default is the localhost.
If the callback server can't be established because of the port is not free,
this driver loops and tries with a port number one higher until it finds a free port
to listen for callbacks.
| Field Summary | |
|---|---|
CallbackAddress |
callbackAddress
|
static int |
DEFAULT_CALLBACK_PORT
XmlBlaster XMLRPC callback web server listen port is 8081 |
protected PluginInfo |
pluginInfo
|
| Constructor Summary | |
|---|---|
XmlRpcCallbackServer()
You must call initialize after constructing me |
|
| Method Summary | |
|---|---|
java.lang.String |
getCbAddress()
Returns the current callback address. |
java.lang.String |
getCbProtocol()
Returns the 'well known' protocol type. |
java.lang.String |
getType()
Enforced by I_Plugin |
java.lang.String |
getVersion()
Enforced by I_Plugin |
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin). |
void |
initialize(Global glob,
java.lang.String name,
CallbackAddress callbackAddress,
I_CallbackExtended client)
Construct a persistently named object. |
java.lang.String |
ping(java.lang.String str)
Ping to check if the callback server is alive. |
void |
postInitialize()
|
void |
shutdown()
Shutdown the callback server. |
java.lang.String |
update(java.lang.String cbSessionId,
java.lang.String updateKey,
byte[] content,
java.lang.String updateQos)
The update method. |
void |
updateOneway(java.lang.String cbSessionId,
java.lang.String updateKey,
byte[] content,
java.lang.String updateQos)
The 'oneway' update method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_CALLBACK_PORT
public CallbackAddress callbackAddress
protected PluginInfo pluginInfo
| Constructor Detail |
|---|
public XmlRpcCallbackServer()
| Method Detail |
|---|
public java.lang.String getType()
getType in interface I_Pluginpublic java.lang.String getVersion()
getVersion in interface I_Plugin
public void init(Global glob,
PluginInfo pluginInfo)
init in interface I_PluginI_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public void initialize(Global glob,
java.lang.String name,
CallbackAddress callbackAddress,
I_CallbackExtended client)
throws XmlBlasterException
initialize in interface I_CallbackServerclient - Your implementation of I_CallbackExtended, or null if you don't want any updates.glob - The global handle with your environment settingsname - The login name of the client, for logging onlycallbackAddress - The address configuration of this callback server
XmlBlasterException
public void postInitialize()
throws XmlBlasterException
XmlBlasterExceptionpublic java.lang.String getCbProtocol()
getCbProtocol in interface I_CallbackServer
public java.lang.String getCbAddress()
throws XmlBlasterException
getCbAddress in interface I_CallbackServerXmlBlasterExceptionpublic void shutdown()
shutdown in interface I_CallbackServershutdown in interface I_Plugin
public java.lang.String update(java.lang.String cbSessionId,
java.lang.String updateKey,
byte[] content,
java.lang.String updateQos)
throws XmlBlasterException
XmlBlasterException
public void updateOneway(java.lang.String cbSessionId,
java.lang.String updateKey,
byte[] content,
java.lang.String updateQos)
public java.lang.String ping(java.lang.String str)
I_CallbackDriver.ping(String)
|
xmlBlaster 2.2.0 client API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||