xmlBlaster 2.1.0 API

org.xmlBlaster.contrib.dbwriter
Class DbWriterPlugin

java.lang.Object
  extended by org.xmlBlaster.contrib.GlobalInfo
      extended by org.xmlBlaster.contrib.dbwriter.DbWriterPlugin
All Implemented Interfaces:
DbWriterPluginMBean, I_Info, I_Plugin

public class DbWriterPlugin
extends GlobalInfo
implements DbWriterPluginMBean

DbWriterPlugin is a plugin wrapper if you want to run DbWriter inside xmlBlaster.

This plugin uses java.util.logging and redirects the logging to xmlBlasters default logging framework. You can switch this off by setting the attribute xmlBlaster/jdk14loggingCapture to false.

Author:
Marcel Ruff

Field Summary
private  java.util.List dbWriterList
           
private static java.util.logging.Logger log
           
 
Fields inherited from class org.xmlBlaster.contrib.GlobalInfo
global, LOWER_CASE, ORIGINAL_ENGINE_GLOBAL, pluginInfo, UNTOUCHED, UPPER_CASE
 
Fields inherited from interface org.xmlBlaster.contrib.I_Info
ID, JMX_PREFIX
 
Constructor Summary
DbWriterPlugin()
          Default constructor, you need to call doInit(Global, PluginInfo) thereafter.
 
Method Summary
 java.lang.String addDbWriter(java.lang.String loginName, java.lang.String password)
           
protected  void doInit(Global global_, PluginInfo pluginInfo)
           
 java.lang.String getClients()
           
 java.lang.String removeDbWriter(java.lang.String loginName)
           
 void shutdown()
          Cleans up the resource.
 
Methods inherited from class org.xmlBlaster.contrib.GlobalInfo
dump, get, getBoolean, getGlobal, getInt, getKeys, getLong, getObject, getObjectKeys, getOriginalGlobal, getRaw, getStrippedString, getType, getVersion, init, loadPlugin, put, putObject, putRaw, replaceAllEntries, setStrippedHostname
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static java.util.logging.Logger log

dbWriterList

private java.util.List dbWriterList
Constructor Detail

DbWriterPlugin

public DbWriterPlugin()
Default constructor, you need to call doInit(Global, PluginInfo) thereafter.

Method Detail

doInit

protected void doInit(Global global_,
                      PluginInfo pluginInfo)
               throws XmlBlasterException
Specified by:
doInit in class GlobalInfo
Parameters:
global_ - The global passed by the RunLevelManager, this is not the object owned by the plugin. It is the original global.
Throws:
XmlBlasterException
See Also:
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)

addDbWriter

public java.lang.String addDbWriter(java.lang.String loginName,
                                    java.lang.String password)
Specified by:
addDbWriter in interface DbWriterPluginMBean

getClients

public java.lang.String getClients()
Specified by:
getClients in interface DbWriterPluginMBean

removeDbWriter

public java.lang.String removeDbWriter(java.lang.String loginName)
Specified by:
removeDbWriter in interface DbWriterPluginMBean

shutdown

public void shutdown()
              throws XmlBlasterException
Description copied from interface: I_Plugin
Cleans up the resource.

Specified by:
shutdown in interface DbWriterPluginMBean
Specified by:
shutdown in interface I_Plugin
Overrides:
shutdown in class GlobalInfo
Throws:
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.

See Also:
I_Plugin.shutdown()

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.