org.ops4j.pax.scanner.internal
Class InstallableBundleImpl

java.lang.Object
  extended by org.ops4j.pax.scanner.internal.InstallableBundleImpl
All Implemented Interfaces:
InstallableBundle

public class InstallableBundleImpl
extends java.lang.Object
implements InstallableBundle


Constructor Summary
InstallableBundleImpl(org.osgi.framework.BundleContext bundleContext, ScannedBundle scannedBundle)
          Creates a new Installable Bundle with no start level service.
InstallableBundleImpl(org.osgi.framework.BundleContext bundleContext, ScannedBundle scannedBundle, org.osgi.service.startlevel.StartLevel startLevelService)
          Creates a new Installable Bundle with a start level service that can be null.
 
Method Summary
 org.osgi.framework.Bundle getBundle()
          Return the installed bundle.
 InstallableBundle install()
          Installs the bundle.
 InstallableBundle start()
          Starts the installed bundle regardles the fact that the bundle was marked that it should not start.
 InstallableBundle startIfNecessary()
          Starts the installed bundle if the bundle should be started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstallableBundleImpl

public InstallableBundleImpl(org.osgi.framework.BundleContext bundleContext,
                             ScannedBundle scannedBundle)
Creates a new Installable Bundle with no start level service.

Parameters:
bundleContext - a bundle context; mandatory
scannedBundle - scanned bundle; mandatory

InstallableBundleImpl

public InstallableBundleImpl(org.osgi.framework.BundleContext bundleContext,
                             ScannedBundle scannedBundle,
                             org.osgi.service.startlevel.StartLevel startLevelService)
Creates a new Installable Bundle with a start level service that can be null.

Parameters:
bundleContext - a bundle context; mandatory
scannedBundle - scanned bundle; mandatory
startLevelService - a start level service; optional
Method Detail

getBundle

public org.osgi.framework.Bundle getBundle()
Description copied from interface: InstallableBundle
Return the installed bundle. If the bunndle was not installed returns null.

Specified by:
getBundle in interface InstallableBundle
Returns:
the installed bundle
See Also:
InstallableBundle.getBundle()

install

public InstallableBundle install()
                          throws org.osgi.framework.BundleException
Description copied from interface: InstallableBundle
Installs the bundle.

Specified by:
install in interface InstallableBundle
Returns:
itself, for fluent api usage
Throws:
org.osgi.framework.BundleException - if the bundle could not be installed
See Also:
InstallableBundle.install()

startIfNecessary

public InstallableBundle startIfNecessary()
                                   throws org.osgi.framework.BundleException
Description copied from interface: InstallableBundle
Starts the installed bundle if the bundle should be started. If the bundle was not installed before it will first try to install the bundle.

Specified by:
startIfNecessary in interface InstallableBundle
Returns:
itself, for fluent api usage
Throws:
org.osgi.framework.BundleException - if the bundle could not be installed
See Also:
InstallableBundle.startIfNecessary()

start

public InstallableBundle start()
                        throws org.osgi.framework.BundleException
Description copied from interface: InstallableBundle
Starts the installed bundle regardles the fact that the bundle was marked that it should not start. If the bundle was not installed before it will first try to install the bundle.

Specified by:
start in interface InstallableBundle
Returns:
itself, for fluent api usage
Throws:
org.osgi.framework.BundleException - if the bundle could not be installed
See Also:
InstallableBundle.start()


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.