xmlBlaster 2.1.0 API

org.xmlBlaster.engine.cluster
Class LoadBalancerPluginManager

java.lang.Object
  extended by org.xmlBlaster.util.plugin.PluginManagerBase
      extended by org.xmlBlaster.engine.cluster.LoadBalancerPluginManager
All Implemented Interfaces:
I_PluginManager

public class LoadBalancerPluginManager
extends PluginManagerBase

Loads the plugin to support cluster load balancing. Please register your plugins in xmlBlaster.properties, for example:

 LoadBalancerPlugin[MyLoadBalancer][1.0]=com.mycompany.MyLoadBalancer
 
Only one entry is allowed.


Field Summary
private  ClusterManager clusterManager
           
private static java.lang.String defaultPluginName
          The default plugin "org.xmlBlaster.engine.cluster.simpledomain.RoundRobin" is loaded if not otherwise specified
private  ServerScope glob
           
static java.lang.String pluginPropertyName
           
 
Fields inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
NO_PLUGIN_TYPE
 
Constructor Summary
LoadBalancerPluginManager(ServerScope glob, ClusterManager clusterManager)
           
 
Method Summary
 java.lang.String getDefaultPluginName(java.lang.String type, java.lang.String version)
           
 I_LoadBalancer getPlugin(java.lang.String type, java.lang.String version)
          Return a specific plugin.
protected  java.lang.String getPluginPropertyName()
           
 void postInstantiate(I_Plugin plugin, PluginInfo pluginInfo)
          Is called after a plugin in instantiated, allows the base class to do specific actions.
 
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

defaultPluginName

private static final java.lang.String defaultPluginName
The default plugin "org.xmlBlaster.engine.cluster.simpledomain.RoundRobin" is loaded if not otherwise specified

See Also:
Constant Field Values

pluginPropertyName

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

glob

private final ServerScope glob

clusterManager

private final ClusterManager clusterManager
Constructor Detail

LoadBalancerPluginManager

public LoadBalancerPluginManager(ServerScope glob,
                                 ClusterManager clusterManager)
Method Detail

getPlugin

public I_LoadBalancer getPlugin(java.lang.String type,
                                java.lang.String version)
                         throws XmlBlasterException
Return a specific plugin.

Parameters:
String - The type of the requested plugin.
String - The version of the requested plugin.
Returns:
The load balancer for this type and version or null if none is specified
Throws:
XmlBlasterException

postInstantiate

public void postInstantiate(I_Plugin plugin,
                            PluginInfo pluginInfo)
Description copied from class: PluginManagerBase
Is called after a plugin in instantiated, allows the base class to do specific actions. Is NOT called when plugin got from cache.

Overrides:
postInstantiate in class PluginManagerBase

getPluginPropertyName

protected java.lang.String getPluginPropertyName()
Overrides:
getPluginPropertyName in class PluginManagerBase
Returns:
The name of the property in xmlBlaster.property "LoadBalancerPlugin" for "LoadBalancerPlugin[RoundRobin][1.0]"

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 classname or null if not specified

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.