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
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
init()
Initializes the module containerprotected void
void
start
(Module.StartOptions... options) Starts this moduleprotected void
Performs any work associated with starting a module.void
stop
(Module.StopOptions... options) Stops this module.protected void
Performs any work associated with stopping a module.void
update()
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, unlockStateChange
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:Module
Starts this module- Overrides:
start
in classModule
- Parameters:
options
- the options for starting- Throws:
BundleException
- if an errors occurs while starting
-
stop
Description copied from class:Module
Stops this module.- Overrides:
stop
in 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:Module
Performs any work associated with starting a module. For example, loading and calling start on an activator.- Overrides:
startWorker
in classModule
- Throws:
BundleException
- if there was an exception starting the module
-
stopWorker
Description copied from class:Module
Performs any work associated with stopping a module. For example, calling stop on an activator.- Overrides:
stopWorker
in classModule
- Throws:
BundleException
- if there was an exception stopping the module
-