|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.plugin.PluginManagerBase org.xmlBlaster.engine.mime.PublishPluginManager
public class PublishPluginManager
Loads publish() filter plugin depending on message MIME type. Please register your plugins in xmlBlaster.properties, for example:
MimePublishPlugin[MyFilter][1.0]=com.mycompany.MyFilter
Field Summary | |
---|---|
private static java.lang.String |
defaultPluginName
|
private java.lang.Object |
dummyObject
A dummy object which we put into the mimeCache if no plugins are found |
private ServerScope |
glob
|
private static java.util.logging.Logger |
log
|
private int |
maxMimeCacheSize
To avoid huge caches if every message sends crazy different mime types |
private java.lang.String |
ME
|
private java.util.Map |
mimeCache
Cache for up to now arrived message mime types |
private java.util.Map |
pluginMap
Map holds the known plugins |
static java.lang.String |
pluginPropertyName
|
Fields inherited from class org.xmlBlaster.util.plugin.PluginManagerBase |
---|
NO_PLUGIN_TYPE |
Constructor Summary | |
---|---|
PublishPluginManager(ServerScope glob)
|
Method Summary | |
---|---|
java.util.Map |
findMimePlugins(java.lang.String mime,
java.lang.String mimeExtended)
|
java.lang.String |
getDefaultPluginName(java.lang.String type,
java.lang.String version)
|
java.lang.String |
getName()
A human readable name of the listener for logging. |
protected java.lang.String |
getPluginPropertyName()
|
boolean |
hasPlugins()
Are there any plugins? |
void |
initializePlugins()
Instantiate all given plugins from xmlBlaster.properties. |
void |
postInstantiate(I_Plugin plugin_,
PluginInfo pluginInfo)
Called from base class after creation |
void |
runlevelChange(int from,
int to,
boolean force)
Invoked on run level change, see RunlevelManager.RUNLEVEL_HALTED and RunlevelManager.RUNLEVEL_RUNNING Enforced by I_RunlevelListener |
void |
shutdown()
|
Methods inherited from class org.xmlBlaster.util.plugin.PluginManagerBase |
---|
createPluginPropertyKey, getDummyPlugin, getFromPluginCache, getGlobal, getPluginObject, getPluginObject, getPluginObject, ignorePlugin, instantiatePlugin, instantiatePlugin, removeFromPluginCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String ME
private static final java.lang.String defaultPluginName
public static final java.lang.String pluginPropertyName
private final ServerScope glob
private static java.util.logging.Logger log
private final java.util.Map pluginMap
private final java.util.Map mimeCache
private final java.lang.Object dummyObject
private final int maxMimeCacheSize
Constructor Detail |
---|
public PublishPluginManager(ServerScope glob) throws XmlBlasterException
XmlBlasterException
Method Detail |
---|
public void postInstantiate(I_Plugin plugin_, PluginInfo pluginInfo)
postInstantiate
in class PluginManagerBase
public void initializePlugins() throws XmlBlasterException
MimePublishPlugin[PublishLenChecker][1.0]=org.xmlBlaster.engine.mime.demo.PublishLenChecker,DEFAULT_MAX_LEN=200
If invoked again, the loaded plugins are reset and reloaded with the current property settings
XmlBlasterException
public final boolean hasPlugins()
public java.util.Map findMimePlugins(java.lang.String mime, java.lang.String mimeExtended)
protected java.lang.String getPluginPropertyName()
getPluginPropertyName
in class PluginManagerBase
public java.lang.String getDefaultPluginName(java.lang.String type, java.lang.String version)
getDefaultPluginName
in interface I_PluginManager
getDefaultPluginName
in class PluginManagerBase
type
- can be nullversion
- can be null
public void shutdown()
shutdown
in class PluginManagerBase
public java.lang.String getName()
getName
in interface I_RunlevelListener
getName
in interface I_PluginManager
getName
in class PluginManagerBase
public void runlevelChange(int from, int to, boolean force) throws XmlBlasterException
runlevelChange
in interface I_RunlevelListener
from
- The current runlevelto
- The runlevel we want to switch toforce
- If true force the change even if messages are lost
XmlBlasterException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |