|
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.engine.StartupTasks
public class StartupTasks
This plugin is loaded on xmlBlaster startup and executes the script file xmlBlasterStartup.xml.
The file xmlBlasterStartup.xml follows the syntax rules of XmlScriptInterpreter
.
This StartupTasks plugin is started with the run level manager as configured in xmlBlasterPlugins.xml, for example:
<plugin id='StartupTasks' className='org.xmlBlaster.engine.StartupTasks'> <action do='LOAD' onStartupRunlevel='7' sequence='1' onFail='resource.configuration.pluginFailed'/> <action do='STOP' onShutdownRunlevel='6' sequence='1'/> <attribute id='loginName'>_StartupTasks</attribute> <attribute id='password'>secret</attribute> <attribute id='scriptFileName'>xmlBlasterStartup.xml</attribute> <attribute id='directoryName'>${user.home}</attribute> <attribute id='outFileName'></attribute> </plugin>
The script file name defaults to $HOME/xmlBlasterStartup.xml.
We use the LOCAL protocol driver to talk to xmlBlaster, therefor this plugin works only if the client and server is in the same virtual machine (JVM).
Field Summary | |
---|---|
private I_XmlBlasterAccess |
connection
|
private ConnectQos |
connectQos
|
private java.lang.String |
directoryName
|
private boolean |
doConnect
|
private boolean |
doDisconnect
|
private Global |
global
|
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private java.lang.String |
outFileName
|
private PluginInfo |
pluginInfo
|
private java.lang.String |
scriptFileName
|
private java.net.URL |
scriptFileUrl
|
Constructor Summary | |
---|---|
StartupTasks()
|
Method Summary | |
---|---|
private void |
excuteStartupTasks()
On startup execute given script. |
java.lang.String |
getType()
|
java.lang.String |
getVersion()
|
void |
init(Global glob,
PluginInfo pluginInfo)
Initializes the plugin |
void |
shutdown()
Shutdown the plugin |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private PluginInfo pluginInfo
private Global global
private static java.util.logging.Logger log
private I_XmlBlasterAccess connection
private java.lang.String directoryName
private java.lang.String scriptFileName
private java.net.URL scriptFileUrl
private java.lang.String outFileName
private boolean doConnect
private boolean doDisconnect
private ConnectQos connectQos
Constructor Detail |
---|
public StartupTasks()
Method Detail |
---|
public void init(Global glob, PluginInfo pluginInfo) throws XmlBlasterException
init
in interface I_Plugin
XmlBlasterException
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)
public java.lang.String getType()
getType
in interface I_Plugin
I_Plugin.getType()
public java.lang.String getVersion()
getVersion
in interface I_Plugin
I_Plugin.getVersion()
public void shutdown() throws XmlBlasterException
shutdown
in interface I_Plugin
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()
private void excuteStartupTasks() throws XmlBlasterException
XmlBlasterException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |