|
||||||||||
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.BundleHost
org.eclipse.osgi.framework.internal.core.SystemBundle
public class SystemBundle
This class subclasses Bundle to provide a system Bundle so that the framework can be represented as a bundle and can access the services provided by other bundles.
Field Summary |
---|
Fields inherited from class org.eclipse.osgi.framework.internal.core.BundleHost |
---|
context, fragments |
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 | |
---|---|
protected |
SystemBundle(Framework framework)
Private SystemBundle object constructor. |
Method Summary | |
---|---|
protected void |
close()
Close the the Bundle's file. |
java.net.URL |
getResource(java.lang.String name)
Find the specified resource in this bundle. |
boolean |
hasPermission(java.lang.Object permission)
Determine whether the bundle has the requested permission. |
protected boolean |
isUnresolved()
Indicate SystemBundle is resolved. |
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 |
resume()
Start the SystemBundle. |
void |
start()
Start this bundle. |
void |
stop()
Stop the framework. |
protected void |
suspend()
Stop the SystemBundle. |
protected void |
suspend(boolean lock)
Stop this bundle w/o marking is persistently stopped. |
void |
uninstall()
Uninstall this bundle. |
protected boolean |
unload()
Unload the bundle. |
protected void |
unresolvePermissions(AbstractBundle[] refreshedBundles)
No work to do for the SystemBundle. |
void |
update()
Update this bundle. |
void |
update(java.io.InputStream in)
Update this bundle from an InputStream. |
Methods inherited from class org.eclipse.osgi.framework.internal.core.BundleHost |
---|
attachFragment, createContext, getBundleLoader, getContext, getFragments, getLoaderProxy, getRegisteredServices, getResources, getServicesInUse, readyToResume, startWorker, stopWorker |
Methods inherited from class org.eclipse.osgi.framework.internal.core.AbstractBundle |
---|
beginStateChange, checkValid, compare, compareTo, completeStateChange, createBundle, findEntries, findLocalEntryPaths, getBundleContext, getBundleData, getBundleDescription, getBundleId, getEntry, getEntryPaths, getHeaders, getHeaders, getHosts, getKey, getKeyHashCode, getLastModified, getLocation, getProtectionDomain, getResolutionFailureMessage, getResourceBundle, getStartLevel, getState, getStateChanging, getSymbolicName, getVersion, isActive, isFragment, isResolved, loadBundleActivator, loadClass, resolve, setStatus, start, stop, testStateChanging, toString, uninstallWorker, uninstallWorkerPrivileged, unresolvePermissions, updateWorker, updateWorkerPrivileged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected SystemBundle(Framework framework) throws BundleException
framework
- Framework this bundle is running in
BundleException
Method Detail |
---|
protected void load()
load
in class BundleHost
protected boolean reload(AbstractBundle newBundle)
reload
in class BundleHost
newBundle
-
protected void refresh()
refresh
in class BundleHost
protected boolean unload()
unload
in class BundleHost
protected void close()
close
in class AbstractBundle
protected java.lang.Class loadClass(java.lang.String name, boolean checkPermission) throws java.lang.ClassNotFoundException
loadClass
in class BundleHost
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)
getResource
in interface Bundle
getResource
in class BundleHost
name
- The name of the resource.
See java.lang.ClassLoader.getResource for a description of
the format of a resource name.
Bundle.getEntry(java.lang.String)
,
Bundle.findEntries(java.lang.String, java.lang.String, boolean)
protected boolean isUnresolved()
public void start()
start
in interface Bundle
start
in class AbstractBundle
Bundle.start(int)
protected void resume()
resume
in class AbstractBundle
public void stop()
stop
in interface Bundle
stop
in class AbstractBundle
Bundle.start(int)
protected void suspend()
protected void suspend(boolean lock)
AbstractBundle
The following steps are followed to stop a bundle:
Bundle.UNINSTALLED
then an IllegalStateException
is thrown.
Bundle.STOPPING
,Bundle.RESOLVED
, or
Bundle.INSTALLED
then this method returns immediately.
Bundle.STARTING
then this method may wait for
the bundle to reach the Bundle.ACTIVE
state before continuing. If this
does not occur in a reasonable time, a BundleException
is thrown
to indicate the bundle was unable to be stopped.
Bundle.STOPPING
.
stop
method of the bundle's
BundleActivator
, if one is specified, is called. If the
BundleActivator
throws an exception, this method will continue
to stop the bundle. A BundleException
will be thrown after
completion of the remaining steps.
Bundle.RESOLVED
.
BundleEvent
of type BundleEvent.STOPPED
is
broadcast.
Bundle.ACTIVE
}.
Bundle.ACTIVE
,Bundle.STOPPING
}.
BundleActivator.stop
has been called
and did not throw an exception.
suspend
in class AbstractBundle
lock
- true if state change lock should be held when returning from
this method.public void update()
update
in interface Bundle
update
in class AbstractBundle
AbstractBundle.stop()
,
AbstractBundle.start()
public void update(java.io.InputStream in)
update
in interface Bundle
update
in class AbstractBundle
in
- The InputStream from which to read the new bundle.AbstractBundle.update()
public void uninstall() throws BundleException
uninstall
in interface Bundle
uninstall
in class AbstractBundle
BundleException
- If the uninstall failed.AbstractBundle.stop()
public boolean hasPermission(java.lang.Object permission)
true
.
hasPermission
in interface Bundle
hasPermission
in class AbstractBundle
permission
- The requested permission.
true
protected void unresolvePermissions(AbstractBundle[] refreshedBundles)
refreshedBundles
- A list of bundles which have been refreshed as a result
of a packageRefresh
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |