org.xmlBlaster.util.queue
Class QueuePluginManager
java.lang.Object
org.xmlBlaster.util.plugin.PluginManagerBase
org.xmlBlaster.util.queue.QueuePluginManager
- All Implemented Interfaces:
- I_PluginManager
public class QueuePluginManager
- extends PluginManagerBase
QueuePluginManager loads the I_Queue implementation plugins.
Usage examples:
// xmlBlaster.properties or on command line
QueuePlugin[JDBC][1.0]=org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin
// Access it in the code
String defaultPersistent = glob.getProperty().get("queue.cache.persistentQueue", "JDBC,1.0");
I_Queue queue = pluginManager.getPlugin(defaultPersistent, uniqueQueueId, queuePropertyBase);
- Author:
- Michele Laghi., Marcel Ruff.
- See Also:
- engine.queue
Method Summary |
void |
cleanup(I_Storage storage)
|
java.lang.String |
getDefaultPluginName(java.lang.String type,
java.lang.String version)
|
StorageEventHandler |
getEventHandler(java.lang.String key)
|
I_Queue |
getPlugin(PluginInfo pluginInfo,
StorageId storageId,
QueuePropertyBase props)
|
I_Queue |
getPlugin(java.lang.String typeVersion,
StorageId storageId,
QueuePropertyBase props)
|
I_Queue |
getPlugin(java.lang.String type,
java.lang.String version,
StorageId storageId,
QueuePropertyBase props)
Return a new created (persistent) queue plugin. |
protected java.lang.String |
getPluginPropertyName()
Enforced by PluginManagerBase. |
protected void |
postInstantiate(I_Plugin plugin,
PluginInfo pluginInfo)
Is called after a plugin in instantiated, allows the base class to do specific actions. |
boolean |
setEventHandler(java.lang.String key,
StorageEventHandler handler)
Set an EventHandler singleton |
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 |
pluginPropertyName
public static final java.lang.String pluginPropertyName
- See Also:
- Constant Field Values
QueuePluginManager
public QueuePluginManager(Global glob)
getPlugin
public I_Queue getPlugin(java.lang.String typeVersion,
StorageId storageId,
QueuePropertyBase props)
throws XmlBlasterException
- Throws:
XmlBlasterException
- See Also:
getPlugin(String, String, StorageId, QueuePropertyBase)
getPlugin
public I_Queue getPlugin(java.lang.String type,
java.lang.String version,
StorageId storageId,
QueuePropertyBase props)
throws XmlBlasterException
- Return a new created (persistent) queue plugin.
- Parameters:
String
- The type of the requested plugin, pass 'undef' to suppress using a storage.String
- The version of the requested plugin.fn
- The file name for persistence or null (will be generated or ignored if RAM based)
- Returns:
- The plugin for this type and version or null if none is specified or type=="undef"
- Throws:
XmlBlasterException
getPlugin
public I_Queue getPlugin(PluginInfo pluginInfo,
StorageId storageId,
QueuePropertyBase props)
throws XmlBlasterException
- Throws:
XmlBlasterException
cleanup
public void cleanup(I_Storage storage)
getPluginPropertyName
protected java.lang.String getPluginPropertyName()
- Enforced by PluginManagerBase.
- Overrides:
getPluginPropertyName
in class PluginManagerBase
- Returns:
- The name of the property in xmlBlaster.property "QueuePlugin"
for "QueuePlugin[JDBC][1.0]"
postInstantiate
protected 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
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 nullversion
- can be null
- Returns:
- please return your default plugin class name or null if not specified
setEventHandler
public boolean setEventHandler(java.lang.String key,
StorageEventHandler handler)
throws XmlBlasterException
- Set an EventHandler singleton
- Parameters:
handler
- null resets an existing handler
- Returns:
- if false another one existed already and your handler is not set
- Throws:
XmlBlasterException
getEventHandler
public StorageEventHandler getEventHandler(java.lang.String key)
Copyright © 1999-2014 The xmlBlaster.org contributers.