Package org.eclipse.osgi.container
Class SystemModule
java.lang.Object
org.eclipse.osgi.container.Module
org.eclipse.osgi.container.SystemModule
- All Implemented Interfaces:
Comparable<Module>,BundleReference,BundleStartLevel
A special kind of module that represents the system module for the container.
Additional methods are available on the system module for operations that
effect the whole container. For example, initializing the container,
restarting and waiting for the container to stop.
- Since:
- 3.10
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.osgi.container.Module
Module.Settings, Module.StartOptions, Module.State, Module.StopOptions -
Field Summary
Fields inherited from class org.eclipse.osgi.container.Module
ACTIVE_SET, RESOLVED_SET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidinit()Initializes the module containerprotected voidvoidstart(Module.StartOptions... options) Starts this moduleprotected voidPerforms any work associated with starting a module.voidstop(Module.StopOptions... options) Stops this module.protected voidPerforms any work associated with stopping a module.voidupdate()Restarts the module container.waitForStop(long timeout) Waits until the module container has stopped.Methods inherited from class org.eclipse.osgi.container.Module
cleanup, compareTo, getContainer, getCurrentRevision, getId, getLastModified, getLocation, getRevisions, getStartLevel, getState, getStateChangeOwner, holdsTransitionEventLock, isActivationPolicyUsed, isParallelActivated, isPersistentlyStarted, lockStateChange, setParallelActivation, setStartLevel, toString, unlockStateChangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.osgi.framework.BundleReference
getBundle
-
Constructor Details
-
SystemModule
-
-
Method Details
-
init
Initializes the module container- Throws:
BundleException- if an exeption occurred while initializing
-
waitForStop
Waits until the module container has stopped.- Parameters:
timeout- The amount of time to wait.- Returns:
- The container event indicated why the framework stopped or if there was a time out waiting for stop.
- Throws:
InterruptedException- if the thread was interrupted while waiting- See Also:
-
initWorker
- Throws:
BundleException- may be thrown by overrides
-
start
Description copied from class:ModuleStarts this module- Overrides:
startin classModule- Parameters:
options- the options for starting- Throws:
BundleException- if an errors occurs while starting
-
stop
Description copied from class:ModuleStops this module.- Overrides:
stopin classModule- Parameters:
options- options for stopping- Throws:
BundleException- if an error occurs while stopping
-
update
Restarts the module container.- Throws:
BundleException- See Also:
-
startWorker
Description copied from class:ModulePerforms any work associated with starting a module. For example, loading and calling start on an activator.- Overrides:
startWorkerin classModule- Throws:
BundleException- if there was an exception starting the module
-
stopWorker
Description copied from class:ModulePerforms any work associated with stopping a module. For example, calling stop on an activator.- Overrides:
stopWorkerin classModule- Throws:
BundleException- if there was an exception stopping the module
-