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, Nameable

public class ComponentInstaller
extends AbstractInstaller
implements javax.jbi.management.InstallerMBean, 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, java.io.File jbiArtifact, boolean autoStart)
           
 
Method Summary
protected  void cleanUpBootstrap()
           
 void configure(java.util.Properties props)
           
protected  java.lang.ClassLoader createClassLoader(org.osgi.framework.Bundle bundle, java.lang.String name, java.lang.String[] classPathNames, boolean parentFirst, SharedLibrary[] sharedLibs)
           
 javax.jbi.component.Component getInnerComponent()
           
 javax.management.ObjectName getInstallerConfigurationMBean()
          Get the installer configuration MBean name for this component.
 java.lang.String getInstallRoot()
          Get the installation root directory path for this BC or SE.
 java.lang.String getMainType()
           
 java.lang.String getName()
           
 javax.management.ObjectName getObjectName()
           
 java.lang.String getParent()
           
 java.lang.Class getPrimaryInterface()
           
 java.lang.String getSubType()
           
 java.lang.String getVersion()
           
 void init()
           
 javax.management.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(javax.management.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
deletePreferences, extractBundle, getBundle, getBundleContext, getPreferences, 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,
                          java.io.File jbiArtifact,
                          boolean autoStart)
                   throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getInstallRoot

public java.lang.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 javax.management.JMException
Throws:
javax.management.JMException

unregister

public void unregister()
                throws javax.management.JMException
Throws:
javax.management.JMException

getName

public java.lang.String getName()
Specified by:
getName in interface 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 java.lang.Exception
Overrides:
init in class AbstractInstaller
Throws:
java.lang.Exception

install

public javax.management.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 java.lang.Exception
Specified by:
stop in class AbstractInstaller
Throws:
java.lang.Exception

uninstall

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

getInstallerConfigurationMBean

public javax.management.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 javax.management.ObjectName getObjectName()
Returns:
Returns the objectName.

setObjectName

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

createClassLoader

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

cleanUpBootstrap

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

configure

public void configure(java.util.Properties props)
               throws java.lang.Exception
Throws:
java.lang.Exception

getParent

public java.lang.String getParent()
Specified by:
getParent in interface Nameable

getMainType

public java.lang.String getMainType()
Specified by:
getMainType in interface Nameable

getSubType

public java.lang.String getSubType()
Specified by:
getSubType in interface Nameable

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface Nameable

getPrimaryInterface

public java.lang.Class getPrimaryInterface()
Specified by:
getPrimaryInterface in interface Nameable


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