|
||||||||||
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 BundleLoaderProxy[] |
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, START_ACTIVATION_POLICY, START_TRANSIENT, STARTING, STOP_TRANSIENT, STOPPING, UNINSTALLED |
Constructor Summary | |
---|---|
BundleFragment(BundleData bundledata,
Framework framework)
|
Method Summary | |
---|---|
protected boolean |
addHost(BundleLoaderProxy host)
Adds a host bundle for this fragment. |
protected BundleLoader |
getBundleLoader()
|
protected BundleContextImpl |
getContext()
Return the current context for this bundle. |
protected BundleLoaderProxy[] |
getHosts()
|
ServiceReference[] |
getRegisteredServices()
Provides a list of ServiceReference s 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 |
getResources(java.lang.String name)
Find the specified resources from this bundle. |
ServiceReference[] |
getServicesInUse()
Provides a list of ServiceReference s 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 |
---|
beginStateChange, checkValid, close, compare, compareTo, completeStateChange, createBundle, findEntries, findLocalEntryPaths, getBundleContext, getBundleData, getBundleDescription, getBundleId, getEntry, getEntryPaths, getFragments, getHeaders, getHeaders, getKey, getKeyHashCode, getLastModified, getLocation, getProtectionDomain, getResolutionFailureMessage, getResourceBundle, getStartLevel, getState, getStateChanging, getSymbolicName, getVersion, hasPermission, isActive, isResolved, loadBundleActivator, loadClass, readyToResume, resolve, resume, setStatus, start, start, stop, stop, suspend, testStateChanging, toString, uninstall, uninstallWorker, uninstallWorkerPrivileged, unresolvePermissions, update, update, updateWorker, updateWorkerPrivileged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BundleLoaderProxy[] hosts
Constructor Detail |
---|
public BundleFragment(BundleData bundledata, Framework framework) throws BundleException
bundledata
- framework
-
BundleException
Method Detail |
---|
protected void load()
load
in class AbstractBundle
protected boolean reload(AbstractBundle newBundle)
reload
in class AbstractBundle
newBundle
- Dummy Bundle which contains new data.
protected void refresh()
refresh
in class AbstractBundle
protected boolean unload()
unload
in class AbstractBundle
protected java.lang.Class loadClass(java.lang.String name, boolean checkPermission) throws java.lang.ClassNotFoundException
loadClass
in class AbstractBundle
name
- 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 getResources(java.lang.String name)
Bundle
INSTALLED
, 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.
name
- The name of the resource. See
java.lang.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 AbstractBundle
options
-
BundleException
protected void stopWorker(int options) throws BundleException
stopWorker
in class AbstractBundle
options
-
BundleException
public ServiceReference[] getRegisteredServices()
ServiceReference
s 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.ServiceRegistrationImpl
,
ServiceReference
public ServiceReference[] getServicesInUse()
ServiceReference
s 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.ServiceReference
protected BundleLoaderProxy[] getHosts()
getHosts
in class AbstractBundle
protected boolean isFragment()
isFragment
in class AbstractBundle
protected boolean addHost(BundleLoaderProxy host)
value
- the BundleHost to add to the set of host bundlesprotected BundleLoader getBundleLoader()
getBundleLoader
in class AbstractBundle
protected BundleContextImpl getContext()
getContext
in class AbstractBundle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |