Difference between revisions of "Uno/Spec/Environment Stack"
m (Fixed: section level.) |
m |
||
Line 1: | Line 1: | ||
− | State: draft | + | Type: specification State: draft Claim: recommended |
− | + | ||
==Feature== | ==Feature== | ||
− | The [[../Runtime|Runtime]] allows to enter / leave a particular [[../Purpose Environment|Purpose Environment]], respectively to invoke functions in | + | The [[../Runtime|Runtime]] allows to enter / leave a particular [[../Purpose Environment|Purpose Environment]], respectively to invoke functions in a particular [[../Purpose Environment|Purpose Environment]]. The current (purpose) environment does not only vary with the languages [[Uno/Term/Object Binary Interface|OBI]] (e.g. Java or C++), but also with the executed codes declared purpose type. |
==Rationale== | ==Rationale== | ||
Line 16: | Line 15: | ||
==Comment== | ==Comment== | ||
− | The enter / leave functionality may not be appropriate for all environments at all times. E.g. the [[../Thread Affinity Bridge | thread affine environment]] does not allow to be entered, while it already has a thread associated. | + | The enter / leave functionality may not be appropriate for all environments at all times. E.g. the [[../Thread Affinity Bridge|thread affine environment]] does not allow to be entered, while it already has a thread associated. |
[[Category:Uno:Spec]] | [[Category:Uno:Spec]] |
Revision as of 16:10, 29 September 2006
Type: specification State: draft Claim: recommended
Contents
Feature
The Runtime allows to enter / leave a particular Purpose Environment, respectively to invoke functions in a particular Purpose Environment. The current (purpose) environment does not only vary with the languages OBI (e.g. Java or C++), but also with the executed codes declared purpose type.
Rationale
Operations may need to be associated with the Uno/Spec/Environment(s) of a particular object. Such operations may set thread related global variables (e.g. the component- or current-context) or may acquire mutexes.
API
-
getCurrentEnvironment
- Provides the current active Uno/Spec/Environment, in case no Uno/Spec/Environment has been entered, the Thread safe environment is returned. -
invoke
- Invokes the passed function in the given Uno/Spec/Environment. -
enter
- Enters the given Uno/Spec/Environment. Uno/Spec/Environment can be left by entering another [../
Eenvironment]].
-
isValid
- Checks if the passed Uno/Spec/Environment is active, so that objects belonging to this Uno/Spec/Environment may be called.
Comment
The enter / leave functionality may not be appropriate for all environments at all times. E.g. the thread affine environment does not allow to be entered, while it already has a thread associated.