Java Reference
In-Depth Information
pattern, which we discussed in section 4.1.3. Other types of OSG i events (like frame-
work, bundle, service, and log events) are mapped and republished by the Event
Admin Service implementation.
CONFIGURATION ADMIN SERVICE
The OSG i Configuration Admin Service delivers configuration data to those services
with persistent identifiers ( service.pid ) that implement the ManagedService inter-
face—or ManagedServiceFactory , if they want to create a new service instance per
configuration. These so-called configuration targets accept configuration data in the
form of a dictionary of properties. Management bundles, which have been granted
permission to configure services, can use the Configuration Admin Service to initial-
ize and update configurations for other bundles. Nonmanagement bundles can only
update their own configurations. The Configuration Admin Service is pluggable and
can be extended by registering implementations of the ConfigurationPlugin inter-
face with the OSG i service registry. Chapter 9 provides detailed examples of how to
supply and consume configuration data.
USER ADMIN SERVICE
The OSG i User Admin Service provides a role-based model for authentication
(checking credentials) and authorization (checking access rights). An authenticat-
ing bundle uses the User Admin Service to prepopulate the required roles, groups,
and users along with identifying properties and credentials. This bundle can query
the User Admin Service at a later date to find users, check their credentials, and con-
firm their authorized roles. It can then decide how to proceed based on the results
of these checks.
This is a short sample of the compendium services; you can find a complete table
in appendix B. You can also read detailed specifications of each service in OSG i Service
Platform Service Compendium . 7
4.7
Summary
That was a lot of information to digest, so don't worry if you got a bit woozy. Let's sum-
marize this chapter:
A service is “work done for another.”
Service contracts define responsibilities and match consumers with providers.
Services
encourage
a
relaxed,
pluggable,
interface-based
approach
to
programming.
You don't need to care where a service comes from as long as it meets the contract.
The best place to use services is between replaceable components.
Think carefully before using services in tightly coupled or high-performance
code.
Services can replace the listener pattern with a much simpler whiteboard pattern.
OSGi Alliance, OSGi Service Platform Service Compendium (2009), www.osgi.org/download/r4v42/r4.cmpn.pdf
7
 
Search WWH ::




Custom Search