- ホーム
- > 洋書
- > 英文書
- > Computer / Languages
Full Description
<>A Hands-On Guide to Equinox and the OSGi FrameworkIn OSGI and Equinox: Creating Highly Modular Java (TM) Systems, three leading experts show developers-for the first time-exactly how to make the most of these breakthrough technologies for building highly modular dynamic systems.You'll quickly get started with Eclipse bundle tooling, create your first OSGi-based system, and move rapidly to sophisticated production development. Next, you'll master best practices and techniques for creating systems with exceptional modularity and maintainability. You'll learn all about OSGi's Declarative Services and how to use them to solve a wide variety of real-world problems. Finally, you'll see everything that you've learned implemented in a complete case study project that takes you from early prototype through application delivery.For every Eclipse developer, regardless of previous experience, this bookCombines a complete hands-on tutorial, online sample code at every step, and deep technical dives for working developers Covers the OSGi programming model, component development, OSGi services, Eclipse bundle tooling, server-side Equinox, and much more Offers knowledge, guidance, and best practices for overcoming the complexities of building modular systems Addresses practical issues ranging from integrating third-party code libraries to server-side programming Includes a comprehensive case study that goes beyond prototyping to deliver a fully refined and refactored production systemWhatever your application, industry, or problem domain, if you want to build state-of-the-art software systems with OSGi and Equinox, you will find this book to be an essential resource.
Contents
Foreword xxiPreface xxvAcknowledgments xxixAbout the Authors xxxiiiPart I: Introduction 1Chapter 1: OSGi, Equinox, and Eclipse 31.1 A Bit of History 31.2 Collaboration 41.3 Modularity and Freedom of Action 51.4 Platforms 71.5 Ecosystems 71.6 OSGi in Context 81.7 OSGi and Equinox in Practice 101.8 Summary 11Chapter 2: OSGi Concepts 132.1 A Community of Bundles 132.2 Why OSGi? 152.3 The Anatomy of a Bundle 182.4 Modularity 192.5 Modular Design Concepts 212.6 Lifecycle 222.7 Collaboration 242.8 The OSGi Framework 262.9 Security 272.10 OSGi Framework Implementations 272.11 Summary 28Part II: OSGi by Example 29Chapter 3: Tutorial Introduction 313.1 What Is Toast? 313.2 The Evolution of Toast 343.3 Development Environment Installation 363.4 Sample Code 363.5 Target Platform Setup 393.6 Learning by Example 463.7 Summary 48Chapter 4: Hello, Toast 494.1 A Simple Scenario 494.2 Slicing Toast into Bundles 564.3 Summary 65Chapter 5: Services 675.1 Moving to Services 675.2 Registering the GPS Service 695.3 Registering the Airbag Service 755.4 Acquiring Services 795.5 Launching 815.6 Troubleshooting 825.7 Summary 83Chapter 6: Dynamic Services 856.1 Introduction to Dynamic Services 856.2 Using Service Trackers 876.4 Using Declarative Services 976.5 Summary 105Chapter 7: Client/Server Interaction 1077.1 The Back End 1087.2 The Client Side 1117.3 Utility Classes 1197.4 Running Toast 1217.5 Summary 123Chapter 8: Testing 1258.1 Making Toast Testable 1268.2 Unit-Testing Toast 1268.3 System-Testing Toast 1318.4 Summary 139Chapter 9: Packaging 1419.1 Defining a Toast Product 1419.2 Exporting Toast 1499.3 Packaging for Other Platforms 1529.4 Getting Serious about Component Definition 1549.5 Summary 158Chapter 10: Pluggable Services 16110.1 Separating Interface from Implementation 16210.2 Device Simulation 16510.3 Simulated Devices as Pluggable Services 16710.4 Running with Simulated Devices 16910.5 Summary 171Chapter 11: Extensible User Interface 17311.1 Crust 17311.2 Emergency 17511.3 Climate and Audio 18111.4 The OSGi Application Model 18411.5 Navigation and Mapping 18711.6 Summary 195Chapter 12: Dynamic Configuration 19712.1 The Tracking Scenario 19712.2 Installing the Tracking Code 19812.3 Running the Basic Tracking Scenario 20112.4 Configuration 20112.5 Summary 205Chapter 13: Web Portal 20713.1 Portal 20713.2 The PortalServlet 20813.3 Action Lookup Using Services 21013.4 Declaring a Portal Action 21313.5 Whiteboard Pros and Cons 21513.6 Summary 216Chapter 14: System Deployment with p2 21714.1 Introduction to Equinox p2 21714.2 Refining the Toast Structure 22114.3 Writing a Provisioner 22914.4 Adding a Deployment Web UI 23314.5 Exporting, Running, and Provisioning 23514.6 Client-Side Dynamic Deployment 24114.7 Summary 242Part III: Deep Dives 245Chapter 15: Declarative Services 24715.1 The Declarative Services Model 24715.2 Common Scenarios 24815.3 Launching and Debugging DS Applications 26915.4 PDE Tooling 27015.5 Summary 273Chapter 16: Extensions 27516.1 The Extension Registry 27516.2 Extension Points 27816.3 Extensions 28016.4 Advanced Extension Topics 28116.5 Extension Registry Lifecycle 28316.6 Dynamic Extension Scenarios 28416.7 Services and Extensions 29016.8 Extension Registry Myths 29316.9 Summary 293Chapter 17: Logging 29517.1 The Log Service Specification 29517.2 Using the LogService in Toast 29817.3 Using the LogReaderService 30117.4 Toast's LogUtility Class 30317.5 Equinox's LogService Implementations 30417.6 Summary 306Chapter 18: HTTP Support 30718.1 The HttpService 30818.2 Registering and Unregistering a Servlet 30918.3 Declarative HTTP Content Registrations 31218.4 Using Jetty 31318.5 HTTP Contexts and JAAS Integration 31418.6 Troubleshooting 31818.7 Summary 320Chapter 19: Server Side 32119.1 Servers and OSGi 32219.2 Embedding the Back End in a Web Application 32319.3 Remote Services in OSGi 33319.4 Summary 341Chapter 20: Release Engineering 34320.1 What Is PDE Build? 34420.2 Bundle build.properties 3 4520.3 Setting Up a Builder 34720.4 Running the Builder 35320.5 Tweaking the Build 35620.6 Building Add-on Features 36320.7 Building WARs 36720.8 Summary 367Part IV: Reference 369Chapter 21: Dynamic Best Practices 37121.1 Dynamism and You 37121.2 Dynamic Aspects of Toast 37221.3 Dynamic Challenges 37421.4 Dynamic Awareness 37421.5 The Extender Pattern and BundleTracker 37821.6 Dynamic Enablement 37921.7 The Dynamics of Startup and Shutdown 38221.8 Summary 385Chapter 22: Integrating Code Libraries 38722.1 JARs as Bundles 38822.2 Bundling by Injection 38822.3 Bundling by Wrapping 39022.4 Bundling by Reference 39222.5 Bundling Using bnd 39422.6 Troubleshooting Class Loading Problems 39422.7 Summary 403Chapter 23: Advanced Topics 40523.1 The Equinox Console 40623.2 Roles in OSGi 40923.3 The Shape of Bundles 41123.4 Fragments 41323.5 Singletons 41523.6 Bundle Lifecycle 41623.7 Bundle Activation Policy 41923.8 Controlling Bundle Start 42123.9 Class Loading 42323.10 Configuring and Running Equinox 42823.11 Data Areas 43223.12 Summary 434Chapter 24: Declarative Services Reference 43524.1 Component XML Schema v1.1.0 43524.2 The Component Lifecycle 44424.3 Summary 457Index 459