160 IBM WebSphere Everyplace Access V5, Volume IV: Advanced Topics
The Location Aware Services portlet:
Provides appropriate service to the application based on the preferences that
are given by the application through the properties file. This functionality is
taken care by the Location Service Factory.
Determines service failures based on service failover policies and takes
appropriate action. This functionality is handled by the Service Binder object.
Determines the ordering of service providers who are offering the same
service. If Location Aware Services cannot determine which service provider
to use, then it uses the order set by the administrator for the services.
Location Service Factory
As the name implies, Location Service Factory creates instances of Location
Aware Services adapters when requested. The request for adapters can come
from two sources: applications, via the service binder objects, and internally via
service monitor object when it decides that the particular service adapter is
needed.
The Location Service Factory makes use of the parameters that are supplied to
determine which service provider adapter must be instantiated. For example, for
map services, the parameters might include the coverage region, the format of
the maps, and so on. The Location Service Factory that is based on these
parameters provides the best-fit service provider. If there is a conflict because
several providers provide the requested features, then the order set by the
administrator is taken.
Service Binder objects
Service Binder objects provide the point at which Location Aware Services
mediates access to location services. To the application, these objects offer the
interfaces of specific location services. Internally, they make use of Location
Service Factory functions to instantiate adapters. Service Binder objects also
handle service failure based on failover policies and replace services.
Service Monitor
This monitors the status of all the current services and notifies the Service Binder
if any of the service fails so that the failed service can be replaced by other
service providers.
Service Registry
The Service Registry is a repository of service descriptions and other service
data, including authentication credentials. Service descriptions contain
information that Location Aware Services require to manage the service,
including a unique name (within the Location Aware Services installation) and