xmlBlaster 2.2.0 client API

org.xmlBlaster.util.dispatch.plugins
Class DispatchPluginManager

java.lang.Object
  extended by org.xmlBlaster.util.plugin.PluginManagerBase
      extended by org.xmlBlaster.util.dispatch.plugins.DispatchPluginManager
All Implemented Interfaces:
I_PluginManager

public class DispatchPluginManager
extends PluginManagerBase

DispatchPluginManager loads the I_MsgDispatchInterceptor implementation plugins.

Usage examples:

 // xmlBlaster.properties or on command line
 DispatchPlugin[Priority][1.0]=org.xmlBlaster.util.dispatch.plugins.prio.PriorizedDispatchPlugin
 DispatchPlugin[FeedMotion][1.0]=org.xmlBlaster.util.dispatch.plugins.motion.FeedMotionDispatchPlugin
 DispatchPlugin/defaultPlugin=Priority,1.0
 # Switch off:
 # DispatchPlugin/defaultPlugin=undef
 
    I_MsgDispatchInterceptor interceptor = glob.getDispatchPluginManager().getPlugin("Priority", "1.0", "XY", queuePropertyBase);
 

Author:
Marcel Ruff.
See Also:
dispatch.plugin

Field Summary
static java.lang.String pluginPropertyName
           
 
Fields inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
glob, NO_PLUGIN_TYPE
 
Constructor Summary
DispatchPluginManager(Global glob)
           
 
Method Summary
 java.lang.String getDefaultPluginName(java.lang.String type, java.lang.String version)
           
 I_MsgDispatchInterceptor getPlugin(java.lang.String typeVersion)
          Return a specific dispatcher plugin, if possible from the cache.
 java.lang.String getPluginPropertyName()
          Enforced by PluginManagerBase.
protected  void postInstantiate(I_Plugin plugin, PluginInfo pluginInfo)
          Called after getPlugin() but only if plugin was new created
 
Methods inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
createPluginPropertyKey, getDummyPlugin, getFromPluginCache, getGlobal, getName, getPluginObject, getPluginObject, getPluginObject, ignorePlugin, instantiatePlugin, instantiatePlugin, removeFromPluginCache, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pluginPropertyName

public static final java.lang.String pluginPropertyName
See Also:
Constant Field Values
Constructor Detail

DispatchPluginManager

public DispatchPluginManager(Global glob)
Method Detail

getPlugin

public I_MsgDispatchInterceptor getPlugin(java.lang.String typeVersion)
                                   throws XmlBlasterException
Return a specific dispatcher plugin, if possible from the cache.

This PluginManager exists once in the scope of a Global instance (check util.Global) therefore the plugin of same typeVersion is only loaded once.

Parameters:
typeVersion - The type and version e.g. "Priority,1.0"
Returns:
null if no plugin was loaded
Throws:
XmlBlasterException

getPluginPropertyName

public java.lang.String getPluginPropertyName()
Enforced by PluginManagerBase.

Overrides:
getPluginPropertyName in class PluginManagerBase
Returns:
The name of the property in xmlBlaster.property "DispatchPlugin" for "DispatchPlugin[Priority][1.0]"

postInstantiate

protected void postInstantiate(I_Plugin plugin,
                               PluginInfo pluginInfo)
                        throws XmlBlasterException
Called after getPlugin() but only if plugin was new created

Overrides:
postInstantiate in class PluginManagerBase
Throws:
XmlBlasterException

getDefaultPluginName

public java.lang.String getDefaultPluginName(java.lang.String type,
                                             java.lang.String version)
Specified by:
getDefaultPluginName in interface I_PluginManager
Overrides:
getDefaultPluginName in class PluginManagerBase
Parameters:
type - can be null
version - can be null
Returns:
please return your default plugin class name or null if not specified

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.