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

java.lang.Object
  extended by org.apache.servicemix.jbi.deployer.impl.AbstractInstaller
Direct Known Subclasses:
ComponentInstaller, ServiceAssemblyInstaller, SharedLibraryInstaller

public abstract class AbstractInstaller
extends Object

Installers are used to controll the installation / deployment process of JBI artifacts and manage the installed OSGi bundle. TODO: refactor the use of installRoot and reuse the Deployer#jbiRootDir


Field Summary
protected  boolean autoStart
           
protected  org.osgi.framework.Bundle bundle
           
protected  Deployer deployer
           
protected  Descriptor descriptor
           
protected  File installRoot
           
protected  boolean isFirstInstall
           
protected  boolean isModified
           
protected  File jbiArtifact
           
static String LAST_INSTALL
           
protected  org.slf4j.Logger logger
           
protected  boolean uninstallFromOsgi
           
 
Constructor Summary
protected AbstractInstaller(Deployer deployer, Descriptor descriptor, File jbiArtifact, boolean autoStart)
           
 
Method Summary
protected  void deleteStorage()
           
protected  void extractBundle(File installRoot, org.osgi.framework.Bundle bundle, String path)
           
 org.osgi.framework.Bundle getBundle()
           
protected  org.osgi.framework.BundleContext getBundleContext()
           
abstract  String getName()
           
protected  Storage getStorage()
           
 void init()
           
abstract  ObjectName install()
           
 void installBundle()
           
 boolean isAutoStart()
           
 boolean isUninstallFromOsgi()
           
protected  void postInstall()
           
 void setAutoStart(boolean autoStart)
           
 void setBundle(org.osgi.framework.Bundle bundle)
           
 void setUninstallFromOsgi(boolean uninstallFromOsgi)
           
abstract  void stop(boolean force)
           
abstract  void uninstall(boolean force)
           
protected  void uninstallBundle()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAST_INSTALL

public static final String LAST_INSTALL
See Also:
Constant Field Values

logger

protected final org.slf4j.Logger logger

deployer

protected Deployer deployer

descriptor

protected Descriptor descriptor

bundle

protected org.osgi.framework.Bundle bundle

autoStart

protected boolean autoStart

jbiArtifact

protected File jbiArtifact

installRoot

protected File installRoot

uninstallFromOsgi

protected boolean uninstallFromOsgi

isFirstInstall

protected boolean isFirstInstall

isModified

protected boolean isModified
Constructor Detail

AbstractInstaller

protected AbstractInstaller(Deployer deployer,
                            Descriptor descriptor,
                            File jbiArtifact,
                            boolean autoStart)
Method Detail

setBundle

public void setBundle(org.osgi.framework.Bundle bundle)

getBundle

public org.osgi.framework.Bundle getBundle()

getBundleContext

protected org.osgi.framework.BundleContext getBundleContext()

getName

public abstract String getName()

init

public void init()
          throws Exception
Throws:
Exception

postInstall

protected void postInstall()
                    throws Exception
Throws:
Exception

install

public abstract ObjectName install()
                            throws javax.jbi.JBIException
Throws:
javax.jbi.JBIException

stop

public abstract void stop(boolean force)
                   throws Exception
Throws:
Exception

uninstall

public abstract void uninstall(boolean force)
                        throws Exception
Throws:
Exception

installBundle

public void installBundle()
                   throws Exception
Throws:
Exception

uninstallBundle

protected void uninstallBundle()
                        throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

getStorage

protected Storage getStorage()

deleteStorage

protected void deleteStorage()
                      throws IOException
Throws:
IOException

isAutoStart

public boolean isAutoStart()

setAutoStart

public void setAutoStart(boolean autoStart)

isUninstallFromOsgi

public boolean isUninstallFromOsgi()

setUninstallFromOsgi

public void setUninstallFromOsgi(boolean uninstallFromOsgi)

extractBundle

protected void extractBundle(File installRoot,
                             org.osgi.framework.Bundle bundle,
                             String path)
                      throws IOException
Throws:
IOException


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