org.eclipse.osgi.internal.composite
Class SurrogateImpl
java.lang.Object
org.eclipse.osgi.framework.internal.core.AbstractBundle
org.eclipse.osgi.framework.internal.core.BundleHost
org.eclipse.osgi.internal.composite.CompositeBase
org.eclipse.osgi.internal.composite.SurrogateImpl
- All Implemented Interfaces:
- Comparable<Bundle>, KeyedElement, CompositeResolveHelper, CompositeModule, Bundle, BundleReference, BundleStartLevel, BundleRevisions, SurrogateBundle
public class SurrogateImpl
- extends CompositeBase
- implements SurrogateBundle
| Fields inherited from interface org.osgi.framework.Bundle |
ACTIVE, INSTALLED, RESOLVED, SIGNERS_ALL, SIGNERS_TRUSTED, START_ACTIVATION_POLICY, START_TRANSIENT, STARTING, STOP_TRANSIENT, STOPPING, UNINSTALLED |
| Methods inherited from class org.eclipse.osgi.framework.internal.core.BundleHost |
attachFragment, createContext, getBundleLoader, getClassLoader, getContext, getFragments, getLoaderProxy, getRegisteredServices, getResource, getResources, getServicesInUse, load, loadClass, readyToResume, refresh, reload, startWorker, stopWorker, unload |
| Methods inherited from class org.eclipse.osgi.framework.internal.core.AbstractBundle |
adapt, adapt0, beginStateChange, checkValid, close, compare, compareTo, completeStateChange, createBundle, findEntries, getBundle, getBundleContext, getBundleData, getBundleDescription, getBundleId, getDataFile, getEntry, getEntryPaths, getFramework, getHeaders, getHeaders, getKey, getKeyHashCode, getLastModified, getLocation, getProtectionDomain, getResolutionFailureException, getResourceBundle, getRevisions, getSignerCertificates, getStartLevel, getState, getStateChanging, getSymbolicName, getVersion, hasPermission, isActivationPolicyUsed, isActive, isFragment, isPersistentlyStarted, isResolved, loadBundleActivator, loadClass, resolve, resume, setStartLevel, setStatus, start, start, stop, stop, suspend, testStateChanging, toString, uninstallWorker, uninstallWorkerPrivileged, updateWorker, updateWorkerPrivileged |
| Methods inherited from interface org.osgi.framework.Bundle |
adapt, findEntries, getBundleContext, getBundleId, getDataFile, getEntry, getEntryPaths, getHeaders, getHeaders, getLastModified, getLocation, getRegisteredServices, getResource, getResources, getServicesInUse, getSignerCertificates, getState, getSymbolicName, getVersion, hasPermission, loadClass, start, start, stop, stop |
SurrogateImpl
public SurrogateImpl(BundleData bundledata,
Framework framework)
throws BundleException
- Throws:
BundleException
findCompanionFramework
protected Framework findCompanionFramework(Framework thisFramework,
BundleData thisData)
- Specified by:
findCompanionFramework in class CompositeBase
getCompositeBundleContext
public BundleContext getCompositeBundleContext()
- Description copied from interface:
SurrogateBundle
- Returns the bundle context of the associated composite bundle.
- Specified by:
getCompositeBundleContext in interface SurrogateBundle
- Returns:
- the bundle context of the composite bundle. A value
of
null is returned if the composite bundle does
not have a valid bundle context.
getCompanionBundle
protected Bundle getCompanionBundle()
- Specified by:
getCompanionBundle in class CompositeBase
isSurrogate
protected boolean isSurrogate()
- Overrides:
isSurrogate in class CompositeBase
giveExports
public boolean giveExports(ExportPackageDescription[] matchingExports)
- Specified by:
giveExports in interface CompositeResolveHelper
startHook
protected void startHook()
- Overrides:
startHook in class BundleHost
stopHook
protected void stopHook()
- Overrides:
stopHook in class BundleHost
uninstall
public void uninstall()
throws BundleException
- Description copied from class:
AbstractBundle
- Uninstall this bundle.
This method removes all traces of the bundle, including any data in the
persistent storage area provided for the bundle by the framework.
The following steps are followed to uninstall a bundle:
- If the bundle is
Bundle.UNINSTALLEDthen an IllegalStateException
is thrown.
- If the bundle is
Bundle.ACTIVEor Bundle.STARTING, the bundle
is stopped as described in the AbstractBundle.stop()method. If AbstractBundle.stop()
throws an exception, a FrameworkEventof type
FrameworkEvent.ERRORis broadcast containing the exception.
- A
BundleEventof type BundleEvent.UNINSTALLEDis
broadcast.
- The state of the bundle is set to
Bundle.UNINSTALLED.
- The bundle and the persistent storage area provided for the bundle
by the framework, if any, is removed.
Preconditions
Postconditons, no exceptions thrown
Postconditions, when an exception is thrown
- Specified by:
uninstall in interface Bundle- Specified by:
uninstall in interface SurrogateBundle- Overrides:
uninstall in class AbstractBundle
- Throws:
BundleException - If the uninstall failed.- See Also:
AbstractBundle.stop()
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.