|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.GlobalInfo
public abstract class GlobalInfo
Field Summary | |
---|---|
protected org.xmlBlaster.util.Global |
global
|
static int |
LOWER_CASE
|
static java.lang.String |
ORIGINAL_ENGINE_GLOBAL
|
protected org.xmlBlaster.util.plugin.PluginInfo |
pluginInfo
|
static int |
UNTOUCHED
|
static int |
UPPER_CASE
|
Fields inherited from interface org.xmlBlaster.contrib.I_Info |
---|
ID, JMX_PREFIX |
Constructor Summary | |
---|---|
GlobalInfo(org.xmlBlaster.util.Global otherGlobal,
I_Info additionalInfo)
Additional infos are added on top of the initial Global configuration. |
|
GlobalInfo(GlobalInfo baseInfo,
I_Info additionalInfo)
|
|
GlobalInfo(java.util.Set propsOfOwnInterest)
|
|
GlobalInfo(java.lang.String[] propKeysAsString)
|
Method Summary | |
---|---|
protected abstract void |
doInit(org.xmlBlaster.util.Global global,
org.xmlBlaster.util.plugin.PluginInfo pluginInfo)
|
static java.lang.String |
dump(I_Info info)
|
java.lang.String |
get(java.lang.String key,
java.lang.String def)
Access a string environment setting. |
boolean |
getBoolean(java.lang.String key,
boolean def)
Access an environment setting of type boolean. |
org.xmlBlaster.util.Global |
getGlobal()
|
int |
getInt(java.lang.String key,
int def)
Access an environment setting of type int. |
java.util.Set |
getKeys()
Gets the keys of the entries stored. |
long |
getLong(java.lang.String key,
long def)
Access an environment setting of type long. |
java.lang.Object |
getObject(java.lang.String key)
Access the remembered object. |
java.util.Set |
getObjectKeys()
Gets the keys of the objects registered. |
static org.xmlBlaster.util.Global |
getOriginalGlobal(I_Info info)
Returns the Base global. |
java.lang.String |
getRaw(java.lang.String key)
Returns the value associated to this key. |
static java.lang.String |
getStrippedString(java.lang.String pureVal)
|
java.lang.String |
getType()
The plugin name as configured im xmlBlasterPlugins.xml |
java.lang.String |
getVersion()
The plugin version as configured in xmlBlasterPlugins.xml |
void |
init(org.xmlBlaster.util.Global global_,
org.xmlBlaster.util.plugin.PluginInfo pluginInfo)
This method is called by the PluginManager. |
static java.lang.Object |
loadPlugin(I_Info info,
java.lang.String pluginClassName,
java.lang.String registryName)
Checks in the registry if such an object exitsts and if not it creates one for you and intializes it. |
void |
put(java.lang.String key,
java.lang.String value)
Put key/value to environment. |
java.lang.Object |
putObject(java.lang.String key,
java.lang.Object o)
Store an object. |
void |
putRaw(java.lang.String key,
java.lang.String value)
Put key/value to environment. |
protected void |
replaceAllEntries()
|
static java.lang.String |
setStrippedHostname(I_Info info,
int chCase)
Convenience to allow the usage of a name mapped to the hostname which can be used as an identifier in a database. |
void |
shutdown()
Cleans up the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ORIGINAL_ENGINE_GLOBAL
public static final int UNTOUCHED
public static final int UPPER_CASE
public static final int LOWER_CASE
protected org.xmlBlaster.util.Global global
protected org.xmlBlaster.util.plugin.PluginInfo pluginInfo
Constructor Detail |
---|
public GlobalInfo(java.util.Set propsOfOwnInterest)
public GlobalInfo(java.lang.String[] propKeysAsString)
public GlobalInfo(org.xmlBlaster.util.Global otherGlobal, I_Info additionalInfo) throws org.xmlBlaster.util.XmlBlasterException
otherGlobal
- can not be null.additionalInfo
- can be null. If not null, these properties will be added on
top of the already set in global.
org.xmlBlaster.util.XmlBlasterException
public GlobalInfo(GlobalInfo baseInfo, I_Info additionalInfo) throws org.xmlBlaster.util.XmlBlasterException
otherInfo
- additionalInfo
- can be null. If not null, these properties will be added on
top of the already set in global.
org.xmlBlaster.util.XmlBlasterException
Method Detail |
---|
public static java.lang.String getStrippedString(java.lang.String pureVal)
public static java.lang.String setStrippedHostname(I_Info info, int chCase)
info
- can be null, in which case only system properties are changed.public static java.lang.Object loadPlugin(I_Info info, java.lang.String pluginClassName, java.lang.String registryName) throws java.lang.Exception
info
- The info object to use.pluginClassName
- The complete name of the plugin to load.registryName
- The name to search in the registry for this
instance. The registry will be in the info object passed. If you
specify null, the lookup is skipped.
java.lang.Exception
protected abstract void doInit(org.xmlBlaster.util.Global global, org.xmlBlaster.util.plugin.PluginInfo pluginInfo) throws org.xmlBlaster.util.XmlBlasterException
global
- The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.pluginInfo
-
org.xmlBlaster.util.XmlBlasterException
public final void init(org.xmlBlaster.util.Global global_, org.xmlBlaster.util.plugin.PluginInfo pluginInfo) throws org.xmlBlaster.util.XmlBlasterException
org.xmlBlaster.util.plugin.I_Plugin
// An entry in xmlBlaster.properties (in one line): MimeSubscribePlugin[ContentLenFilter][1.0]=\ org.xmlBlaster.engine.mime.demo.ContentLenFilter,\ DEFAULT_MAX_LEN=200,DEFAULT_MIN_LEN=20 // Access it like this: java.util.Properties props = pluginInfo.getParameters(); String maxLen = (String)props.get("DEFAULT_MAX_LEN"); String throwLen = (String)props.get("THROW_EXCEPTION_FOR_LEN");
init
in interface org.xmlBlaster.util.plugin.I_Plugin
org.xmlBlaster.util.XmlBlasterException
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)
protected void replaceAllEntries()
public java.lang.String getType()
getType
in interface org.xmlBlaster.util.plugin.I_Plugin
I_Plugin.getType()
public java.lang.String getVersion()
getVersion
in interface org.xmlBlaster.util.plugin.I_Plugin
I_Plugin.getVersion()
public void shutdown() throws org.xmlBlaster.util.XmlBlasterException
org.xmlBlaster.util.plugin.I_Plugin
shutdown
in interface org.xmlBlaster.util.plugin.I_Plugin
org.xmlBlaster.util.XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.I_Plugin.shutdown()
public java.lang.String getRaw(java.lang.String key)
I_Info
getRaw
in interface I_Info
public java.lang.String get(java.lang.String key, java.lang.String def)
I_Info
get
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.get(java.lang.String, java.lang.String)
public void put(java.lang.String key, java.lang.String value)
I_Info
put
in interface I_Info
key
- The parameter keyvalue
- The parameter value, if null the parameter is removed.I_Info.put(java.lang.String, java.lang.String)
public void putRaw(java.lang.String key, java.lang.String value)
I_Info
putRaw
in interface I_Info
key
- The parameter keyvalue
- The parameter value, if null the parameter is removed.I_Info.put(java.lang.String, java.lang.String)
public long getLong(java.lang.String key, long def)
I_Info
getLong
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getLong(java.lang.String, long)
public int getInt(java.lang.String key, int def)
I_Info
getInt
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getInt(java.lang.String, int)
public boolean getBoolean(java.lang.String key, boolean def)
I_Info
getBoolean
in interface I_Info
key
- The parameter keydef
- The default used if key is not found
I_Info.getBoolean(java.lang.String, boolean)
public java.lang.Object getObject(java.lang.String key)
I_Info
getObject
in interface I_Info
key
- The object key
I_Info.getObject(java.lang.String)
public java.lang.Object putObject(java.lang.String key, java.lang.Object o)
I_Info
putObject
in interface I_Info
key
- The object keyo
- The object to remember or null to remove it
I_Info.putObject(java.lang.String, Object)
public java.util.Set getKeys()
I_Info
getKeys
in interface I_Info
I_Info.getKeys()
public java.util.Set getObjectKeys()
I_Info
getObjectKeys
in interface I_Info
I_Info.getObjectKeys()
public static java.lang.String dump(I_Info info)
public org.xmlBlaster.util.Global getGlobal()
public static org.xmlBlaster.util.Global getOriginalGlobal(I_Info info)
info
-
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |