|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.framework.internal.core.AbstractBundle
org.eclipse.osgi.framework.internal.core.BundleFragment
public class BundleFragment
| Field Summary | |
|---|---|
protected BundleHost[] |
hosts
The resolved host that this fragment is attached to |
| Fields inherited from class org.eclipse.osgi.framework.internal.core.AbstractBundle |
|---|
bundledata, domain, framework, manifestLocalization, state, statechangeLock, stateChanging |
| 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 |
| Constructor Summary | |
|---|---|
BundleFragment(BundleData bundledata,
Framework framework)
|
|
| Method Summary | |
|---|---|
protected BundleLoader |
getBundleLoader()
|
protected BundleContextImpl |
getContext()
Return the current context for this bundle. |
ServiceReference<?>[] |
getRegisteredServices()
Provides a list of ServiceReferences for the services
registered by this bundle
or null if the bundle has no registered
services. |
java.net.URL |
getResource(java.lang.String name)
Find the specified resource in this bundle. |
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String name)
Find the specified resources from this bundle's class loader. |
ServiceReference<?>[] |
getServicesInUse()
Provides a list of ServiceReferences for the
services this bundle is using,
or null if the bundle is not using any services. |
protected boolean |
isFragment()
|
protected void |
load()
Load the bundle. |
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean checkPermission)
This method loads a class from the bundle. |
protected void |
refresh()
Refresh the bundle. |
protected boolean |
reload(AbstractBundle newBundle)
Reload from a new bundle. |
protected void |
startWorker(int options)
Internal worker to start a bundle. |
protected void |
stopWorker(int options)
Internal worker to stop a bundle. |
protected boolean |
unload()
Unload the bundle. |
| 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, getFragments, getFramework, getHeaders, getHeaders, getKey, getKeyHashCode, getLastModified, getLocation, getProtectionDomain, getResolutionFailureException, getResourceBundle, getRevisions, getSignerCertificates, getStartLevel, getState, getStateChanging, getSymbolicName, getVersion, hasPermission, isActivationPolicyUsed, isActive, isPersistentlyStarted, isResolved, loadBundleActivator, loadClass, readyToResume, resolve, resume, setStartLevel, setStatus, start, start, stop, stop, suspend, testStateChanging, toString, uninstall, uninstallWorker, uninstallWorkerPrivileged, update, update, updateWorker, updateWorkerPrivileged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected BundleHost[] hosts
| Constructor Detail |
|---|
public BundleFragment(BundleData bundledata,
Framework framework)
throws BundleException
bundledata - framework -
BundleException| Method Detail |
|---|
protected void load()
load in class AbstractBundleprotected boolean reload(AbstractBundle newBundle)
reload in class AbstractBundlenewBundle - Dummy Bundle which contains new data.
protected void refresh()
refresh in class AbstractBundleprotected boolean unload()
unload in class AbstractBundle
protected java.lang.Class<?> loadClass(java.lang.String name,
boolean checkPermission)
throws java.lang.ClassNotFoundException
loadClass in class AbstractBundlename - the name of the desired Class.checkPermission - indicates whether a permission check should be done.
java.lang.ClassNotFoundException - if the class definition was not found.public java.net.URL getResource(java.lang.String name)
name - The name of the resource.
See java.lang.ClassLoader.getResource for a description of
the format of a resource name.
java.lang.IllegalStateException - If this bundle has been uninstalled.Bundle.getEntry(java.lang.String),
Bundle.findEntries(java.lang.String, java.lang.String, boolean)public java.util.Enumeration<java.net.URL> getResources(java.lang.String name)
BundleINSTALLED, this method must
attempt to resolve this bundle before attempting to get the specified
resources. If this bundle cannot be resolved, then only this bundle must
be searched for the specified resources. Imported packages cannot be
searched when a bundle has not been resolved. If this bundle is a
fragment bundle then null is returned.
Note: Jar and zip files are not required to include directory entries. URLs to directory entries will not be returned if the bundle contents do not contain directory entries.
name - The name of the resource. See ClassLoader.getResources for a description of the format of a
resource name.
null if
the resource could not be found or if this bundle is a fragment
bundle or if the caller does not have the appropriate AdminPermission[this,RESOURCE], and the Java Runtime Environment
supports permissions.
protected void startWorker(int options)
throws BundleException
startWorker in class AbstractBundleoptions -
BundleException
protected void stopWorker(int options)
throws BundleException
stopWorker in class AbstractBundleoptions -
BundleExceptionpublic ServiceReference<?>[] getRegisteredServices()
ServiceReferences for the services
registered by this bundle
or null if the bundle has no registered
services.
The list is valid at the time of the call to this method, but the framework is a very dynamic environment and services can be modified or unregistered at anytime.
ServiceReference or null.
java.lang.IllegalStateException - If the
bundle has been uninstalled.ServiceRegistration,
ServiceReferencepublic ServiceReference<?>[] getServicesInUse()
ServiceReferences for the
services this bundle is using,
or null if the bundle is not using any services.
A bundle is considered to be using a service if the bundle's
use count for the service is greater than zero.
The list is valid at the time of the call to this method, but the framework is a very dynamic environment and services can be modified or unregistered at anytime.
ServiceReference or null.
java.lang.IllegalStateException - If the
bundle has been uninstalled.ServiceReferenceprotected boolean isFragment()
isFragment in class AbstractBundleprotected BundleLoader getBundleLoader()
getBundleLoader in class AbstractBundleprotected BundleContextImpl getContext()
getContext in class AbstractBundle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||