next up previous contents
Next: Recursive Context Awareness Up: Context Awareness Previous: Context Awareness

Profiles and Profile Values

 The implementation profile must be specified by the application programmer. The environment has several properties, e.g. default browser, operating system, etc. The environment properties are mapped to a set of profile values . A profile value has a type, e.g. default browser, which correlates with an environment property and a value, e.g. Netscape , which correlates with the current value of an environment property. Every implementation profile consists of a set of profile values.


 
Figure: Implementation profile 

For example the profile of the implementation class Configuration_WINNT_NETSCAPE (s. figure [*]) has profile values of three different types: operating system , CPU architecture and default web browser . The values of the profile values are: WINNT, x86 and Netscape . All three properties must be fulfilled in an environment, that the implementation class Configuration_WINNT_NETSCAPE works properly. Therefore the profile values are associated with and .

The implementation profile must be compared with the current environment in order to determine whether the implementation class is suitable for the environment. For this comparison each profile value is checked whether it matches the current value of an environment property. The equality may not be sufficient, e.g. for the test of an operating system version, it is sufficient, when a version newer than 3.0 is installed rather than exactly 3.0. A matching function is associated with every implementation profile value and describes how this profile value can be matched with the profile value of the environment.

For the matching between a profile value and the value of the environment property a profile value is generated out of the environment property. The generation of profile values out of the environment is specified by the generating function . The result of the matching functions is true (= profile values match) or false (= profile values do not match). The generating function is also contained within the profile value and must be executed in the environment for which the implementation class must be suitable, i.e. the environment, in which the mobile code is running at present.


 
Figure: Generation of environment profile values  

In the case of the implementation class Configuration_WINNT_NETSCAPE, the three profile values generate the complementary profile value of the current environment. Assuming the environment is a PowerPC running AIX with Netscape as default browser, the profile values of the implementation class, generate the profile values NETSCAPE, PPC and AIX (s. figure [*]).

The association of the results of the matching function is defined by the association function as part of a profile. For instance, an implementation class is suitable for a system running Linux or AIX . The implementation profile has two profile values of the type operating system and they are associated by or because the implementation class is suitable for Linux or AIX . The result of the association functions determines whether the implementation class is suitable for the environment or not.


 
Figure: Matching of profile values  

The generated profile values are matched against the profile values of the implementation class, i.e. Configuration_WINNT_NETSCAPE (s. figure [*]). The results of the matching function are associated as defined in the association function, i.e. association by and . The result of the evaluation of the implementation profile in the example environment is negative. The context awareness must proceed to evaluate other implementation profiles of the same implementation group.

In general the generating function of one type of profile value is the same. In the case of the profile values of the type default browser they depend on the environment. For Unix systems, the configuration file in the home directory is checked, but on hosts running Windows, several entries in the Windows Registry must be checked. This principle of context awareness is described in the following section.


next up previous contents
Next: Recursive Context Awareness Up: Context Awareness Previous: Context Awareness
Copyright Munich Network Management Team