Chapter 5. Location Aware Services 159
The role of a service adapter includes:
򐂰 Interface translation
The service adapter translates the interface that is provided by the service
provider to a Location Aware Services interface.
򐂰 Service invocation and error handling
Adapters invoke services depending on the service provider. It could, for
example, be through TCP/IP sockets, HTTP requests, and so on. Adapters
also act like RPC stubs that serialize and deserialize objects that are used by
location services. Adapters insulate the application developer from the
service protocols.
򐂰 Authentication with service providers
Adapters have to handle the authentication mechanism as required by the
service provider.
In order to enable services through WebSphere Everyplace Access, service
providers have to write their own adapters. Adapters must implement specific
interfaces that are provided by Location Aware Services.
Adapters for the following service providers are already provided with
WebSphere Everyplace Access:
򐂰 Webraska
򐂰 MapInfo
򐂰 Go2Map
򐂰 LIF
5.2.2 Location Aware Services portlet service
The core functionality of the Location Aware Services is handled by the portlet
service, which comprises several components and is the core component in the
Location Aware Services architecture.
A portlet service is a discoverable extension to the Portal functionality. Location
Aware Services are implemented as a portlet service because the life cycle is
managed by the Portal and does not have container restrictions placed on
portlets. Application portlets can query the container for Location Aware Services
and use the service without knowing the implementation or concern themselves
with its life cycle management.
To understand more about portlet services, see IBM WebSphere Portal V5: A
Guide for Portlet Application Development, SG24-6076.
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

Get IBM WebSphere Everyplace Access V5 Handbook for Developers and Administrators Volume IV: Advanced Topics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.