it.imolinfo.jbi4cics.jbi
Class BaseBootstrap

java.lang.Object
  extended by it.imolinfo.jbi4cics.jbi.BaseBootstrap
All Implemented Interfaces:
javax.jbi.component.Bootstrap
Direct Known Subclasses:
Jbi4cicsBootstrap

public class BaseBootstrap
extends java.lang.Object
implements javax.jbi.component.Bootstrap

Base class for components bootstrap. Due to classloading mechanism in JBI, Shared Libraries are not available at bootstrap time, so this class should be copied in your own component and modified directly, instead of inheriting it.

Since:
3.0
Version:
$Revision: 1.4 $
Author:
Guillaume Nodet, Marco Cimatti

Constructor Summary
BaseBootstrap()
          Creates a new instance of this class.
 
Method Summary
 void cleanUp()
          Cleans up any resources allocated by the bootstrap implementation, including performing deregistration of the extension MBean, if applicable.
protected  javax.management.ObjectName createExtensionMBeanName()
           
protected  void doCleanUp()
           
protected  void doInit()
           
protected  void doOnInstall()
           
protected  void doOnUninstall()
           
protected  java.lang.Object getExtensionMBean()
           
 javax.management.ObjectName getExtensionMBeanName()
          Obtains the ObjectName of the optional installer configuration MBean.
 void init(javax.jbi.component.InstallationContext installContext)
          Initializes the installation environment for a component.
 void onInstall()
          Called at the beginning of installation of a component to perform any special installation tasks required by the component.
 void onUninstall()
          Called at the beginning of uninstallation of a component to perform any special uninstallation tasks required by the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseBootstrap

public BaseBootstrap()
Creates a new instance of this class. This constructor is required by JBI specifications.

Method Detail

getExtensionMBeanName

public final javax.management.ObjectName getExtensionMBeanName()
Obtains the ObjectName of the optional installer configuration MBean. If none is provided by this component, this method must return null.

This method must be called before onInstall() (or onUninstall()) is called by the JBI implementation.

Specified by:
getExtensionMBeanName in interface javax.jbi.component.Bootstrap
Returns:
the ObjectName of the optional installer configuration MBean; returns null if there is no such MBean.

getExtensionMBean

protected java.lang.Object getExtensionMBean()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

createExtensionMBeanName

protected javax.management.ObjectName createExtensionMBeanName()
                                                        throws java.lang.Exception
Throws:
java.lang.Exception

init

public final void init(javax.jbi.component.InstallationContext installContext)
                throws javax.jbi.JBIException
Initializes the installation environment for a component. This method is expected to save any information from the installation context that may be needed by other methods.

If the component needs to register an optional installer configuration MBean, it MUST do so during execution of this method, or the getExtensionMBean() method.

This method must be called after the installation root (available through the installContext parameter) is prepared.

Specified by:
init in interface javax.jbi.component.Bootstrap
Parameters:
installContext - the context containing information from the install command and from the component installation ZIP file; this must be non-null.
Throws:
javax.jbi.JBIException - when there is an error requiring that the installation be terminated.

doInit

protected void doInit()
               throws java.lang.Exception
Throws:
java.lang.Exception

cleanUp

public final void cleanUp()
                   throws javax.jbi.JBIException
Cleans up any resources allocated by the bootstrap implementation, including performing deregistration of the extension MBean, if applicable.

This method must be called after the onInstall() or onUninstall() method is called, whether it succeeds or fails. It must be called after init() is called, if init() fails by throwing an exception.

Specified by:
cleanUp in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException - if the bootstrap cannot clean up allocated resources.

doCleanUp

protected void doCleanUp()
                  throws java.lang.Exception
Throws:
java.lang.Exception

onInstall

public final void onInstall()
                     throws javax.jbi.JBIException
Called at the beginning of installation of a component to perform any special installation tasks required by the component.

This method must not be called if the init() method failed with an exception.

Specified by:
onInstall in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException - when there is an error requiring that the installation be terminated.

doOnInstall

protected void doOnInstall()
                    throws java.lang.Exception
Throws:
java.lang.Exception

onUninstall

public final void onUninstall()
                       throws javax.jbi.JBIException
Called at the beginning of uninstallation of a component to perform any special uninstallation tasks required by the component.

This method must not be called if the init() method failed with an exception.

Specified by:
onUninstall in interface javax.jbi.component.Bootstrap
Throws:
javax.jbi.JBIException - when there is an error requiring that the uninstallation be terminated.

doOnUninstall

protected void doOnUninstall()
                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2005-2008 Imola Informatica. All Rights Reserved.