Programming Open Service Gateways with Java Embedded Server™ Technology - Kirk Chen,  Mike Hendrickson, Li Gong

Programming Open Service Gateways with Java Embedded Server™ Technology

Buch | Softcover
480 Seiten
2001
Addison Wesley (Verlag)
978-0-201-71102-8 (ISBN)
55,55 inkl. MwSt
  • Keine Verlagsinformationen verfügbar
  • Artikel merken
The Java Embedded Server is a solution for linking consumer devices with services over the Internet. It is based on the Open Services Gateway Initiative Service Gateway Specification 1.0. This work reveals the concepts and inner workings of the Java Embedded Server framework and explains how to program and develop services for open gateways.
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

Kirk Chen, a Staff Engineer at Sun Microsystems, has worked on design and implementation of the Java Embedded Server product since its inception. He has an M.S. in computer science from Stanford University. Li Gong is managing director of Sun Microsystems' Engineering and Research Institute in Beijing, China. Previously at Sun, he was engineering head of Java Security and Networking, Java Embedded Servers, and JXTA. He obtained B.S. and M.S. degrees from Tsinghua University, Beijing, and a Ph.D. from the University of Cambridge. He is associate editor-in-chief of IEEE Internet Computing.

Preface.


Acknowledgments.


1. Introduction.


The Internet and the Networked Home.



The Service Gateway.



Challenges.



A Multitude of Competing Solutions.



A New Application Environment.



Java Embedded Server Technology.



The Open Services Gateway Initiative.



Operational Model.



2. Getting Started.


Setting Up the Java Embedded Server Software.



The "Home, Sweet Home" Bundle.



Create the Directory.



Define the Manifest.



Write an Activator.



Compile the Activator Class.



Pack Up.



Running the Bundle.



Getting Help.



The Cache Directory.



The Bundle Base URL.



Brief Summary of the Major Commands.



3. Architecture and Basic Concepts.


Motivation.



Architecture.



Service.



Bundle.



A Bundle Is a Packaging Vehicle.



A Bundle Is a Functional Module.



The "Hooks" to the Framework.



The Framework.



Cooperation among Bundles and Services.



Exporting and Importing Packages.



Registering and Obtaining Services.



Package versus Service Dependency.



Life within the Framework.



Installing a Bundle.



Starting the Bundle.



Importing Packages and Getting Services.



Handling the Dynamic Service Dependency.



Updating a Bundle.



Stopping and Uninstalling a Bundle.



The Component-based Model.



Forget CLASSPATH.



4. Developing Bundles.


Writing Service Bundles.



Design the Service Interface.



Implement the Service.



Register the Service in the Activator.



Define the Manifest Headers.



Create the Bundle.



Same Service Interface, Different Implementations.



Retrieving Resources from within the Bundle.



Obtaining and Calling Registered Services.



Interbundle Dependency and Class Loading Issues.



Service Use Count.



Compiling Client Bundles.



Service Factory.



Producing a Customized Service for Each Client Bundle.



Service Cache.



Customization for Getting and Releasing Service.



Relevant org.osgi.framework APIs.



BundleContext Interface.



ServiceReference Interface.



ServiceRegistration Interface.



Library Bundles.



Advanced Examples.



A Mailer.



A Line Printer Daemon Print Service.



Writing Bundles That Contain Native Code.



Common Mistakes.



Activator.



Manifest.



Creating a JAR File.



5. Cooperation among Service Bundles.


Event Handling.



Bundle State and Service Registration.



Synchronous and Asynchronous Events.



Dealing with Service Unregistration.



Don't Start without the Service.



Discovering Stale Service.



Carrying On without the Service.



Picking an Alternative.



Cascading Service Registration.



Refusing Service.



Cooperation with Asynchronous Events.



6. Design Patterns and Pitfalls.


Designing the Service.



Separating Service Interface and Implementation.



Challenges in Designing a Service Interface.



Approaching an Interface Design.



The Social Aspect.



Designing Library Bundles.



Delegation and Callback.



Leveraging the Service Registry.



Threading.



Preventing Runaway Threads.



Writing a Multithread Server Bundle.



Using a Thread Pool.



Managing Object Allocation.



Nullify References After Use.



Managing References among Bundles.



7. Standard Services.


The Log Service.



Using LogService to Write Logs.



Using LogReaderService to Get Logs.



Performing Persistent Logging.



The HTTP Service.



The Standard HttpService API.



Performing Basic Authentication.



The Extended HTTP Service.



8. Device Access.


Introduction.



The Software Stack in Device Access.



What Device Access Is Not.



Motivation.



Cast of Characters.



Device Service.



Driver Services.



Driver Locator.



Device Manager.



Writing DA Services.



The Base Driver.



Device Detection.



Device Refinement.



The Reconfiguration Process.



Putting It Together.



9. Permission-based Security and Administration.


Permission-based Security inside the Java 2 Platform.



Code Source.



Permission.



Policy.



Granting Permissions to Classes.



Security Manager.



OSGi Permissions.



AdminPermission.



ServicePermission.



PackagePermission.



Permission Required by the Framework APIs.



Enabling Security.



Setting Up a Policy.



Running with Security Enabled.



Using Permissions in Your Service.



Checking Permissions.



Performing Privileged Actions.



Creating Your Own Permission Types.



Administration.



Resolving Bundles Dynamically.



Relevant APIs.



10. Future Directions.


Removing Phantom Bundles.



Dynamic Permissions.



Preferences.



User Administration.



Configuration Management.



What's Next.



Appendix A. Code Examples.


Chapter 4--Developing Bundles.



The LPD Print Service.



Chapter 8--Device Access.



Serial Service and Driver Locator.



Driver Service and Modem Service.



Web Interface to the Serial Ports.



Chapter 9--Permission-based Security and Administration.



Parameter Services.



Parameter Configuration Servlet.



Facilitator.



Appenidix B. OSGi Service Gateway Specification.


org.osgi.framework.



AdminPermission.



Bundle.



BundleActivator.



BundleContext.



BundleEvent.



BundleException.



BundleListener.



Configurable.



FrameworkEvent.



FrameworkListener.



InvalidSyntaxException.



PackagePermission.



ServiceEvent.



ServiceFactory.



ServiceListener.



ServicePermission.



ServiceReference.



ServiceRegistration.



org.osgi.service.device.



Device.



Driver.



DriverLocator.



org.osgi.service.http.



HttpContext.



HttpService.



NamespaceException.



org.osgi.service.log.



LogEntry.



LogListener.



LogReaderService.



LogService.



Bibliography.


Index. 0201711028T08142001

Erscheint lt. Verlag 25.9.2001
Reihe/Serie Java Series
Verlagsort Harlow
Sprache englisch
Maße 234 x 186 mm
Gewicht 771 g
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Mathematik / Informatik Informatik Software Entwicklung
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-201-71102-8 / 0201711028
ISBN-13 978-0-201-71102-8 / 9780201711028
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90