Programming Open Service Gateways with Java Embedded Server™ Technology

Book description

The Java Embedded Server™ from Sun Microsystems, Inc., is a solution for linking consumer devices with services over the Internet. It is based on the Open Services Gateway Initiative (OSGi) Service Gateway Specification 1.0. Written by authors who are intimately involved with the development and implementation of the specification, Programming Open Service Gateways with Java Embedded Server™ Technology reveals the concepts and inner workings of the Java Embedded Server framework and explains how to program and develop services for open gateways using the Java™ programming language.

With an emphasis on actual coding, this definitive guide begins by explaining the backdrop in which the residential gateway market emerged. Next, the book discusses the history and mission of the Java Embedded Server product and the OSGi consortium. Throughout the book, the Java Embedded Server technical architecture and the OSGi Service Gateway API are presented with examples and detailed implementations. The book's practical, how-to format shows you how to write code for residential gateway applications that is correct, robust, and efficient while avoiding common traps and pitfalls.

Highlights include:

  • Overview of OSGi architecture, including basic concepts and features

  • How to install Java Embedded Server and develop service bundles

  • Design patterns and pitfalls

  • How to use the OSGi standard services: log service and HTTP service

  • OSGi Device Access (DA) service

  • Permission-based security and administration

  • The future undertakings of the OSGi consortium

  • The OSGi Service Gateway Specification 1.0

Programming Open Service Gateways with Java Embedded Server™ Technology gives you an insider's perspective on the development process of new applications and services for the residential gateway environment.


0201711028B09102001

Table of contents

  1. Copyright
  2. Preface
  3. Acknowledgments
  4. Introduction
    1. The Internet and the Networked Home
    2. The Service Gateway
    3. Challenges
    4. Java Embedded Server Technology
    5. The Open Services Gateway Initiative
    6. Operational Model
  5. Getting Started
    1. Setting Up the Java Embedded Server Software
    2. The “Home, Sweet Home” Bundle
    3. Running the Bundle
  6. Architecture and Basic Concepts
    1. Motivation
    2. Architecture
    3. Service
    4. Bundle
    5. The Framework
    6. Cooperation among Bundles and Services
    7. Life within the Framework
    8. The Component-based Model
    9. Forget CLASSPATH
  7. Developing Bundles
    1. Writing Service Bundles
    2. Same Service Interface, Different Implementations
    3. Retrieving Resources from within the Bundle
    4. Obtaining and Calling Registered Services
    5. Service Factory
    6. Relevant org.osgi.framework APIs
    7. Library Bundles
    8. Advanced Examples
    9. Writing Bundles That Contain Native Code
    10. Common Mistakes
  8. Cooperation among Service Bundles
    1. Event Handling
    2. Bundle State and Service Registration
    3. Synchronous and Asynchronous Events
    4. Dealing with Service Unregistration
    5. Cooperation with Asynchronous Events
  9. Design Patterns and Pitfalls
    1. Designing the Service
    2. Designing Library Bundles
    3. Delegation and Callback
    4. Leveraging the Service Registry
    5. Threading
    6. Managing Object Allocation
  10. Standard Services
    1. The Log Service
    2. The HTTP Service
  11. Device Access
    1. Introduction
    2. Motivation
    3. Cast of Characters
    4. Writing DA Services
    5. Putting It Together
  12. Permission-based Security and Administration
    1. Permission-based Security inside the Java 2 Platform
    2. OSGi Permissions
    3. Enabling Security
    4. Using Permissions in Your Service
    5. Administration
  13. Future Directions
    1. Removing Phantom Bundles
    2. Dynamic Permissions
    3. Preferences
    4. User Administration
    5. Configuration Management
    6. What's Next
  14. Code Examples
    1. Chapter 4—Developing Bundles
    2. Chapter 8—Device Access
    3. Chapter 9—Permission-based Security and Administration
  15. OSGi Service Gateway Specification
    1. Package org.osgi.framework
    2. AdminPermission
    3. Bundle
    4. BundleActivator
    5. BundleContext
    6. BundleEvent
    7. BundleException
    8. BundleListener
    9. Configurable
    10. FrameworkEvent
    11. FrameworkListener
    12. InvalidSyntaxException
    13. PackagePermission
    14. ServiceEvent
    15. ServiceFactory
    16. ServiceListener
    17. ServicePermission
    18. ServiceRegistration
    19. Package org.osgi.service.device
    20. Device
    21. Driver
    22. DriverLocator
    23. Package org.osgi.service.http
    24. HttpContext
    25. HttpService
    26. NamespaceException
    27. Package org.osgi.service.log
    28. LogEntry
    29. LogListener
    30. LogReaderService
    31. LogService
  16. Bibliography
  17. Index

Product information

  • Title: Programming Open Service Gateways with Java Embedded Server™ Technology
  • Author(s): Kirk Chen, Li Gong
  • Release date: August 2001
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 0201711028