org.ow2.petals.component.framework
Class DefaultBootstrap

java.lang.Object
  extended by org.ow2.petals.component.framework.JBIBootstrap
      extended by org.ow2.petals.component.framework.DefaultBootstrap
All Implemented Interfaces:
javax.jbi.component.Bootstrap

public class DefaultBootstrap
extends JBIBootstrap

A default bootstrap. This bootstrap class register an MBean object into the JMX server that will be available only during the bootstrap phase. The developer only needs to override methods getMethodList() to set the list of method that he want to expose via JMX.

Author:
chamerling - EBM WebSourcing, rnaudin - EBM WebSourcing

Field Summary
protected  javax.management.ObjectName mbeanName
          The bootstrap MBean name
 
Fields inherited from class org.ow2.petals.component.framework.JBIBootstrap
installContext
 
Constructor Summary
DefaultBootstrap()
           
 
Method Summary
 void cleanUp()
          Clean resources allocated by the bootstrap
protected  void doInit()
          Initialize the bootstrap registering its Extension MBean into the JMX server.
protected  java.util.List<java.lang.String> getAttributeList()
          Method to be overridden if the component implementation needs to expose attributes via JMX.
 javax.management.ObjectName getExtensionMBeanName()
          Returns the extension MBean name.
protected  java.util.List<java.lang.String> getMethodList()
          Method to be overridden if the component implementation needs to expose methods via JMX.
 void onInstall()
          Installs the component persisting the configuration done via the extension Mbean.
 
Methods inherited from class org.ow2.petals.component.framework.JBIBootstrap
getInstallContext, getJbiComponentConfiguration, getLogger, init, onUninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mbeanName

protected javax.management.ObjectName mbeanName
The bootstrap MBean name

Constructor Detail

DefaultBootstrap

public DefaultBootstrap()
Method Detail

getExtensionMBeanName

public javax.management.ObjectName getExtensionMBeanName()
Returns the extension MBean name.

Specified by:
getExtensionMBeanName in interface javax.jbi.component.Bootstrap
Overrides:
getExtensionMBeanName in class JBIBootstrap
Returns:
Returns the extension MBean name, except if the component is installed (ie. the extension MBean is not registered) in which case null is returned.
See Also:
ComponentLifeCycle.getExtensionMBeanName()

onInstall

public void onInstall()
               throws javax.jbi.JBIException
Installs the component persisting the configuration done via the extension Mbean.

Specified by:
onInstall in interface javax.jbi.component.Bootstrap
Overrides:
onInstall in class JBIBootstrap
Throws:
javax.jbi.JBIException
See Also:
Bootstrap.onInstall()

cleanUp

public void cleanUp()
             throws javax.jbi.JBIException
Clean resources allocated by the bootstrap

Specified by:
cleanUp in interface javax.jbi.component.Bootstrap
Overrides:
cleanUp in class JBIBootstrap
Throws:
javax.jbi.JBIException
See Also:
Bootstrap.cleanUp()

doInit

protected void doInit()
               throws javax.jbi.JBIException
Initialize the bootstrap registering its Extension MBean into the JMX server.

Overrides:
doInit in class JBIBootstrap
Throws:
javax.jbi.JBIException
See Also:
JBIBootstrap.doInit()

getMethodList

protected java.util.List<java.lang.String> getMethodList()
Method to be overridden if the component implementation needs to expose methods via JMX. This method is called by the dynamic MBean.

Returns:
a list of method names to expose

getAttributeList

protected java.util.List<java.lang.String> getAttributeList()
Method to be overridden if the component implementation needs to expose attributes via JMX. This method is called by the dynamic MBean.

Returns:
a list of attributes names to expose


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.