|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javaclients.HelloWorldNative
public class HelloWorldNative
This native client plugin is loaded by xmlBlaster on startup, it then connects to xmlBlaster.
You need to add this plugin to xmlBlasterPlugins.xml, for example:<plugin id='HelloWorldNative' className='javaclients.HelloWorldNative'> <action do='LOAD' onStartupRunlevel='3' sequence='0' onFail='resource.configuration.pluginFailed'/> <action do='STOP' onShutdownRunlevel='6' sequence='4'/> </plugin>As a protocol driver to talk to xmlBlaster it has configured "LOCAL", this plugin works only if client and server is in the same virtual machine (JVM). Other protocols like CORBA or SOCKET would work as well but carry the overhead of sending the message over TCP/IP.
Constructor Summary | |
---|---|
HelloWorldNative()
To start as a plugin |
|
HelloWorldNative(java.lang.String[] args)
To start as a separate client: java javaclients.HelloWorldNative |
Method Summary | |
---|---|
java.lang.String |
getType()
|
java.lang.String |
getVersion()
|
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager. |
static void |
main(java.lang.String[] args)
|
void |
shutdown()
Cleans up the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HelloWorldNative()
public HelloWorldNative(java.lang.String[] args)
Method Detail |
---|
public void init(Global glob, PluginInfo pluginInfo) throws XmlBlasterException
I_Plugin
// An entry in xmlBlaster.properties (in one line): MimeSubscribePlugin[ContentLenFilter][1.0]=\ org.xmlBlaster.engine.mime.demo.ContentLenFilter,\ DEFAULT_MAX_LEN=200,DEFAULT_MIN_LEN=20 // Access it like this: java.util.Properties props = pluginInfo.getParameters(); String maxLen = (String)props.get("DEFAULT_MAX_LEN"); String throwLen = (String)props.get("THROW_EXCEPTION_FOR_LEN");
init
in interface I_Plugin
XmlBlasterException
public java.lang.String getType()
getType
in interface I_Plugin
public java.lang.String getVersion()
getVersion
in interface I_Plugin
public void shutdown() throws XmlBlasterException
I_Plugin
shutdown
in interface I_Plugin
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.public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |