Difference between revisions of "Uno/Spec/Environment Stack"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Fixed categories.)
m (Somewhat polished.)
 
Line 2: Line 2:
  
 
==Feature==
 
==Feature==
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.
+
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==
Operations may need to be associated with the [[../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.
+
Operations may need to be associated with the [[../Environment|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==
 
==API==
* <code>getCurrentEnvironment</code> - Provides the current active [[../Environment]], in case no [[../Environment]] has been entered, the [[../Thread Affinity Bridge | Thread safe environment]] is returned.
+
* '''get the current environment''' - Provides the current active [[../Environment|environment]], in case no [[../Environment|environment]] has been entered, the [[../Thread Affinity Bridge|Thread safe environment]] is returned.
* <code>invoke</code> - Invokes the passed function in the given [[../Environment]].
+
* '''invoke''' - Invokes the passed function in the given [[../Environment|environment]].
* <code>enter</code> - Enters the given [[../Environment]]. [[../Environment]] can be left by entering another [../
+
* '''enter''' - Enters the given [[../Environment|environment]]. [[../Environment|environment]] can be left by entering another [[../Environment|environment]].
Eenvironment]].
+
* '''isValid''' - Checks if the passed [[../Environment|environment]] is active, so that objects belonging to this [[../Environment|environment]] may be called.
* <code>isValid</code> - Checks if the passed [[../Environment]] is active, so that objects belonging to this [[../Environment]] may be called.
+
  
 
==Comment==
 
==Comment==

Latest revision as of 09:05, 13 February 2007

Type: specification State: draft Claim: recommended

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 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

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.

Personal tools