org.ow2.petals.container.lifecycle
Class Installer

java.lang.Object
  extended by org.ow2.petals.container.lifecycle.Installer
All Implemented Interfaces:
javax.jbi.management.InstallerMBean, ComponentContextCommunication, InstallerInterface

public class Installer
extends java.lang.Object
implements javax.jbi.management.InstallerMBean, InstallerInterface, ComponentContextCommunication

Author:
alouis, Olivier Fabre - EBM Websourcing, wjoseph - eBMWebsourcing

Field Summary
protected  AdminService adminService
          JBI-Management :: Admin Service
static java.lang.String BS_PREFIX
          Bootstrap classloader id prefix.
protected  ClassLoaderService classloaderService
          Platform :: Loader Service
static java.lang.String COMP_PREFIX
          Component classloader id prefix.
protected  ContainerService container
          Container :: Container Service
protected  EndpointRegistry endpointRegistry
          JBI-Messaging :: EndpointRegistry
static java.lang.String INSTALLED
           
protected  JNDIService jndiService
          Communication :: JNDIService
protected  SystemStateService recoverySrv
          Platform component :: SystemState Service
protected  RepositoryService repositoryService
          Platform :: Repository Service
protected  RouterService router
          JBI-Messaging :: Router Service
protected  javax.transaction.TransactionManager transactionManager
          JBI-Management :: TransactionManager Service
static java.lang.String UNINSTALLED
           
 
Constructor Summary
Installer()
          Create the Installer that will manage installation / uninstallation of the JBI component.
 
Method Summary
 ServiceEndpoint getAddress()
          The address of the component, as a Consumer.
 AdminService getAdminService()
          Get the Admin service.
 javax.jbi.component.Component getComponent()
          Get the JBI component
 java.lang.String getComponentName()
          Get the unique component name of this component, as assigned by the identification section of this component's installation descriptor.
 EndpointRegistry getEndpointRegistry()
          Get the EndpointRegistry service.
 javax.naming.InitialContext getInitialContext()
          The Initial context for the component.
 java.lang.String getInstallationRoot()
          The installation directory of the component.
 javax.management.ObjectName getInstallerConfigurationMBean()
           
 java.lang.String getInstallRoot()
           
 org.ow2.petals.jbi.descriptor.original.generated.Jbi getJBIDescriptor()
          get the JBI Descriptor.
 java.util.logging.Logger getLogger()
          The Logger for the component.
 RouterService getRouterService()
          Get the Router service.
 javax.transaction.TransactionManager getTransactionManagerService()
          Get the TransactionManager service.
 java.lang.String getWorkspaceRoot()
          The working directory for the component.
 void init(Context ctxt)
          init the installer.
 void initBootstrap(boolean install)
          initialize the bootstrap
 javax.management.ObjectName install()
           
 boolean isInstalled()
           
protected  void start()
          Start of the petals component
protected  void stop()
          Stop of the petals component
 void uninstall()
          Uninstall the JBI component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BS_PREFIX

public static final java.lang.String BS_PREFIX
Bootstrap classloader id prefix.

See Also:
Constant Field Values

COMP_PREFIX

public static final java.lang.String COMP_PREFIX
Component classloader id prefix.

See Also:
Constant Field Values

INSTALLED

public static final java.lang.String INSTALLED
See Also:
Constant Field Values

UNINSTALLED

public static final java.lang.String UNINSTALLED
See Also:
Constant Field Values

adminService

protected AdminService adminService
JBI-Management :: Admin Service


classloaderService

protected ClassLoaderService classloaderService
Platform :: Loader Service


router

protected RouterService router
JBI-Messaging :: Router Service


repositoryService

protected RepositoryService repositoryService
Platform :: Repository Service


endpointRegistry

protected EndpointRegistry endpointRegistry
JBI-Messaging :: EndpointRegistry


jndiService

protected JNDIService jndiService
Communication :: JNDIService


container

protected ContainerService container
Container :: Container Service


transactionManager

protected javax.transaction.TransactionManager transactionManager
JBI-Management :: TransactionManager Service


recoverySrv

protected SystemStateService recoverySrv
Platform component :: SystemState Service

Constructor Detail

Installer

public Installer()
Create the Installer that will manage installation / uninstallation of the JBI component. The related bootstrap is created and initialize here.

Method Detail

init

public void init(Context ctxt)
          throws java.io.IOException,
                 javax.jbi.JBIException,
                 javax.naming.NamingException,
                 org.objectweb.fractal.api.NoSuchInterfaceException
Description copied from interface: InstallerInterface
init the installer.

Specified by:
init in interface InstallerInterface
Parameters:
ctxt - the context (installation context)
Throws:
javax.jbi.JBIException - : impossible initialization
java.io.IOException
javax.naming.NamingException
org.objectweb.fractal.api.NoSuchInterfaceException

getInstallerConfigurationMBean

public javax.management.ObjectName getInstallerConfigurationMBean()
                                                           throws javax.jbi.JBIException
Specified by:
getInstallerConfigurationMBean in interface javax.jbi.management.InstallerMBean
Throws:
javax.jbi.JBIException

getInstallRoot

public java.lang.String getInstallRoot()
Specified by:
getInstallRoot in interface javax.jbi.management.InstallerMBean

install

public javax.management.ObjectName install()
                                    throws javax.jbi.JBIException
Specified by:
install in interface javax.jbi.management.InstallerMBean
Throws:
javax.jbi.JBIException

uninstall

public void uninstall()
               throws javax.jbi.JBIException
Uninstall the JBI component. Call the Bootstrap onUninstall() and cleanup() methods, unregister the jbiComponent object,

Specified by:
uninstall in interface javax.jbi.management.InstallerMBean
Throws:
javax.jbi.JBIException - the component is already uninstalled

isInstalled

public boolean isInstalled()
Specified by:
isInstalled in interface javax.jbi.management.InstallerMBean

getComponentName

public java.lang.String getComponentName()
Get the unique component name of this component, as assigned by the identification section of this component's installation descriptor.

Returns:
the component name; must be non-null and non-empty.

getAddress

public ServiceEndpoint getAddress()
Description copied from interface: ComponentContextCommunication
The address of the component, as a Consumer.

Specified by:
getAddress in interface ComponentContextCommunication
Returns:
the consumer endpoint

getEndpointRegistry

public EndpointRegistry getEndpointRegistry()
Description copied from interface: ComponentContextCommunication
Get the EndpointRegistry service.

Specified by:
getEndpointRegistry in interface ComponentContextCommunication
Returns:
the endpoint service

getInitialContext

public javax.naming.InitialContext getInitialContext()
Description copied from interface: ComponentContextCommunication
The Initial context for the component.

Specified by:
getInitialContext in interface ComponentContextCommunication
Returns:
the initial context

getInstallationRoot

public java.lang.String getInstallationRoot()
Description copied from interface: ComponentContextCommunication
The installation directory of the component.

Specified by:
getInstallationRoot in interface ComponentContextCommunication
Returns:
the installation root

getJBIDescriptor

public org.ow2.petals.jbi.descriptor.original.generated.Jbi getJBIDescriptor()
Description copied from interface: ComponentContextCommunication
get the JBI Descriptor.

Specified by:
getJBIDescriptor in interface ComponentContextCommunication
Returns:
the JBI descriptor

getAdminService

public AdminService getAdminService()
Description copied from interface: ComponentContextCommunication
Get the Admin service.

Specified by:
getAdminService in interface ComponentContextCommunication
Returns:
the admin service

getRouterService

public RouterService getRouterService()
Description copied from interface: ComponentContextCommunication
Get the Router service.

Specified by:
getRouterService in interface ComponentContextCommunication
Returns:
the router

getTransactionManagerService

public javax.transaction.TransactionManager getTransactionManagerService()
Description copied from interface: ComponentContextCommunication
Get the TransactionManager service.

Specified by:
getTransactionManagerService in interface ComponentContextCommunication
Returns:
the TransactionManager service

getWorkspaceRoot

public java.lang.String getWorkspaceRoot()
Description copied from interface: ComponentContextCommunication
The working directory for the component.

Specified by:
getWorkspaceRoot in interface ComponentContextCommunication
Returns:
the workspace root

getLogger

public java.util.logging.Logger getLogger()
Description copied from interface: ComponentContextCommunication
The Logger for the component.

Specified by:
getLogger in interface ComponentContextCommunication
Returns:
the logger

getComponent

public javax.jbi.component.Component getComponent()
Get the JBI component

Returns:
the Component instance

initBootstrap

public void initBootstrap(boolean install)
                   throws javax.jbi.JBIException
initialize the bootstrap

Parameters:
install -
Throws:
javax.jbi.JBIException

start

protected void start()
              throws org.ow2.petals.kernel.api.server.PetalsException,
                     javax.jbi.JBIException
Start of the petals component

Throws:
org.ow2.petals.kernel.api.server.PetalsException
javax.jbi.JBIException

stop

protected void stop()
Stop of the petals component



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