org.apache.servicemix.jbi.deployer.impl
Class ComponentInstaller

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.impl.AbstractInstaller
      extended by org.apache.servicemix.jbi.deployer.impl.ComponentInstaller
All Implemented Interfaces:
javax.jbi.management.InstallerMBean, org.apache.servicemix.nmr.management.Nameable

public class ComponentInstaller
extends AbstractInstaller
implements javax.jbi.management.InstallerMBean, org.apache.servicemix.nmr.management.Nameable


Field Summary
 
Fields inherited from class org.apache.servicemix.jbi.deployer.impl.AbstractInstaller
autoStart, bundle, deployer, descriptor, installRoot, isFirstInstall, isModified, jbiArtifact, LAST_INSTALL, logger, uninstallFromOsgi
 
Constructor Summary
ComponentInstaller(Deployer deployer, Descriptor descriptor, File jbiArtifact, boolean autoStart)
           
 
Method Summary
protected  void cleanUpBootstrap()
           
 void configure(Properties props)
           
protected  ClassLoader createClassLoader(org.osgi.framework.Bundle bundle, String name, String[] classPathNames, boolean parentFirst, SharedLibrary[] sharedLibs)
           
 javax.jbi.component.Component getInnerComponent()
           
 ObjectName getInstallerConfigurationMBean()
          Get the installer configuration MBean name for this component.
 String getInstallRoot()
          Get the installation root directory path for this BC or SE.
 String getMainType()
           
 String getName()
           
 ObjectName getObjectName()
           
 String getParent()
           
 Class getPrimaryInterface()
           
 String getSubType()
           
 String getVersion()
           
 void init()
           
 ObjectName install()
          Install a BC or SE.
 boolean isInstalled()
          Determine whether or not the component is installed.
 void register()
           
 void setInnerComponent(javax.jbi.component.Component innerComponent)
           
 void setObjectName(ObjectName objectName)
           
 void stop(boolean force)
           
 void uninstall()
          Uninstall a BC or SE.
 void uninstall(boolean force)
           
 void unregister()
           
 
Methods inherited from class org.apache.servicemix.jbi.deployer.impl.AbstractInstaller
deleteStorage, extractBundle, getBundle, getBundleContext, getStorage, installBundle, isAutoStart, isUninstallFromOsgi, postInstall, setAutoStart, setBundle, setUninstallFromOsgi, uninstallBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentInstaller

public ComponentInstaller(Deployer deployer,
                          Descriptor descriptor,
                          File jbiArtifact,
                          boolean autoStart)
                   throws Exception
Throws:
Exception
Method Detail

getInstallRoot

public String getInstallRoot()
Get the installation root directory path for this BC or SE.

Specified by:
getInstallRoot in interface javax.jbi.management.InstallerMBean
Returns:
the full installation path of this component.

register

public void register()
              throws JMException
Throws:
JMException

unregister

public void unregister()
                throws JMException
Throws:
JMException

getName

public String getName()
Specified by:
getName in interface org.apache.servicemix.nmr.management.Nameable
Specified by:
getName in class AbstractInstaller

getInnerComponent

public javax.jbi.component.Component getInnerComponent()

setInnerComponent

public void setInnerComponent(javax.jbi.component.Component innerComponent)

init

public void init()
          throws Exception
Overrides:
init in class AbstractInstaller
Throws:
Exception

install

public ObjectName install()
                   throws javax.jbi.JBIException
Install a BC or SE.

Specified by:
install in interface javax.jbi.management.InstallerMBean
Specified by:
install in class AbstractInstaller
Returns:
JMX ObjectName representing the ComponentLifeCycle for the installed component, or null if the installation did not complete.
Throws:
javax.jbi.JBIException - if the installation fails.

isInstalled

public boolean isInstalled()
Determine whether or not the component is installed.

Specified by:
isInstalled in interface javax.jbi.management.InstallerMBean
Returns:
true if this component is currently installed, false if not.

uninstall

public void uninstall()
               throws javax.jbi.JBIException
Uninstall a BC or SE. This completely removes the component from the JBI system.

Specified by:
uninstall in interface javax.jbi.management.InstallerMBean
Throws:
javax.jbi.JBIException - if the uninstallation fails.

stop

public void stop(boolean force)
          throws Exception
Specified by:
stop in class AbstractInstaller
Throws:
Exception

uninstall

public void uninstall(boolean force)
               throws Exception
Specified by:
uninstall in class AbstractInstaller
Throws:
Exception

getInstallerConfigurationMBean

public ObjectName getInstallerConfigurationMBean()
                                          throws javax.jbi.JBIException
Get the installer configuration MBean name for this component.

Specified by:
getInstallerConfigurationMBean in interface javax.jbi.management.InstallerMBean
Returns:
the MBean object name of the Installer Configuration MBean.
Throws:
javax.jbi.JBIException - if the component is not in the LOADED state or any error occurs during processing.

getObjectName

public ObjectName getObjectName()
Returns:
Returns the objectName.

setObjectName

public void setObjectName(ObjectName objectName)
Parameters:
objectName - The objectName to set.

createClassLoader

protected ClassLoader createClassLoader(org.osgi.framework.Bundle bundle,
                                        String name,
                                        String[] classPathNames,
                                        boolean parentFirst,
                                        SharedLibrary[] sharedLibs)

cleanUpBootstrap

protected void cleanUpBootstrap()
                         throws javax.jbi.management.DeploymentException
Throws:
javax.jbi.management.DeploymentException

configure

public void configure(Properties props)
               throws Exception
Throws:
Exception

getParent

public String getParent()
Specified by:
getParent in interface org.apache.servicemix.nmr.management.Nameable

getMainType

public String getMainType()
Specified by:
getMainType in interface org.apache.servicemix.nmr.management.Nameable

getSubType

public String getSubType()
Specified by:
getSubType in interface org.apache.servicemix.nmr.management.Nameable

getVersion

public String getVersion()
Specified by:
getVersion in interface org.apache.servicemix.nmr.management.Nameable

getPrimaryInterface

public Class getPrimaryInterface()
Specified by:
getPrimaryInterface in interface org.apache.servicemix.nmr.management.Nameable


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.