xmlBlaster 2.2.0 API

org.xmlBlaster.engine.cluster
Class MapMsgToMasterPluginManager

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

public class MapMsgToMasterPluginManager
extends PluginManagerBase

Loads the cluster plugin depending on message MIME type. Please register your plugins in xmlBlaster.properties, for example:

 MapMsgToMasterPlugin[MyClusterMapper][1.0]=com.mycompany.MyClusterMapper
 


Field Summary
private  ClusterManager clusterManager
           
private static java.lang.String defaultPluginName
          The default plugin "org.xmlBlaster.engine.cluster.simpledomain.DomainToMaster" is loaded if not otherwise specified.
private  ServerScope glob
           
private static java.util.logging.Logger log
           
private  java.util.Map mapMsgToMasterIdMap
           
private static java.lang.String ME
           
static java.lang.String pluginPropertyName
          Entry name for xmlBlaster.properties: "MapMsgToMasterPlugin"
 
Fields inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
NO_PLUGIN_TYPE
 
Constructor Summary
MapMsgToMasterPluginManager(ServerScope glob, ClusterManager clusterManager)
           
 
Method Summary
private  I_MapMsgToMasterId addMapMsgToMasterIdPlugin(java.lang.String type, java.lang.String version)
          Invoked on new subscription or get() invocation, loads plugin.
 java.lang.String getDefaultPluginName(java.lang.String type, java.lang.String version)
           
 I_MapMsgToMasterId getMapMsgToMasterId(java.lang.String type, java.lang.String version, java.lang.String mime, java.lang.String mimeExtended)
          Access cluster domain mapping object from cache.
private  I_MapMsgToMasterId getPlugin(java.lang.String type, java.lang.String version)
          Return a specific MIME based message plugin from cache (initialize it on first request).
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.
 void reset()
          Is called when new configuration arrived, notify all plugins to empty their cache or do whatever they need to do.
 
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

ME

private static final java.lang.String ME
See Also:
Constant Field Values

defaultPluginName

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

See Also:
Constant Field Values

pluginPropertyName

public static final java.lang.String pluginPropertyName
Entry name for xmlBlaster.properties: "MapMsgToMasterPlugin"

See Also:
Constant Field Values

glob

private final ServerScope glob

log

private static java.util.logging.Logger log

clusterManager

private final ClusterManager clusterManager

mapMsgToMasterIdMap

private final java.util.Map mapMsgToMasterIdMap
Constructor Detail

MapMsgToMasterPluginManager

public MapMsgToMasterPluginManager(ServerScope glob,
                                   ClusterManager clusterManager)
Method Detail

getPlugin

private final I_MapMsgToMasterId getPlugin(java.lang.String type,
                                           java.lang.String version)
                                    throws XmlBlasterException
Return a specific MIME based message plugin from cache (initialize it on first request).

Parameters:
String - The type of the requested plugin.
String - The version of the requested plugin.
Returns:
The MapMsgToMasterId 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 final java.lang.String getPluginPropertyName()
Overrides:
getPluginPropertyName in class PluginManagerBase
Returns:
The name of the property in xmlBlaster.property "MapMsgToMasterPlugin" for "MapMsgToMasterPlugin[demo][1.0]"

getDefaultPluginName

public final 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

getMapMsgToMasterId

public final I_MapMsgToMasterId getMapMsgToMasterId(java.lang.String type,
                                                    java.lang.String version,
                                                    java.lang.String mime,
                                                    java.lang.String mimeExtended)
Access cluster domain mapping object from cache.


addMapMsgToMasterIdPlugin

private final I_MapMsgToMasterId addMapMsgToMasterIdPlugin(java.lang.String type,
                                                           java.lang.String version)
Invoked on new subscription or get() invocation, loads plugin.

Returns:
null if not found

reset

public void reset()
Is called when new configuration arrived, notify all plugins to empty their cache or do whatever they need to do.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.