xmlBlaster 2.2.0 client API

org.xmlBlaster.util.plugin
Interface I_Plugin

All Known Subinterfaces:
I_CallbackServer, I_Checkpoint, I_StoragePlugin, I_XmlBlasterConnection
All Known Implementing Classes:
CacheQueueInterceptorPlugin, Checkpoint, ClientPlugin, CorbaCallbackServer, CorbaConnection, EmailCallbackImpl, EmailConnection, FilePollerPlugin, HelloWorldNative, HelloWorldNative2, JdbcQueue, JdbcQueueCommonTablePlugin, LocalCallbackImpl, LocalConnection, Pop3Driver, PriorizedDispatchPlugin, RamQueuePlugin, RmiCallbackServer, RmiConnection, SmtpClient, SocketCallbackImpl, SocketConnection, XmlRpcCallbackServer, XmlRpcConnection

public interface I_Plugin

This interface must be implemented by xmlBlaster plugins.

Author:
W. Kleinertz (wkl) H. Goetzger, Konrad Krafft, Marcel Ruff

Method Summary
 java.lang.String getType()
           
 java.lang.String getVersion()
           
 void init(Global glob, PluginInfo pluginInfo)
          This method is called by the PluginManager.
 void shutdown()
          Cleans up the resource.
 

Method Detail

init

void init(Global glob,
          PluginInfo pluginInfo)
          throws XmlBlasterException
This method is called by the PluginManager.

Example how options are evaluated:

   // 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");
 

Parameters:
Global - An xmlBlaster instance global object holding logging and property informations
PluginInfo - A container holding informations about the plugin, e.g. its parameters
Throws:
XmlBlasterException

getType

java.lang.String getType()

getVersion

java.lang.String getVersion()

shutdown

void shutdown()
              throws XmlBlasterException
Cleans up the resource.

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 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.