Creating Components

Book description

Concurrency is a powerful technique for developing efficient and lightning- fast software. For instance, concurrency can be used in common applications such as online order processing to speed processing and ensure transaction reliability. However, mastering concurrency is one of the greatest challenges for both new and veteran programmers. Softwar

Table of contents

  1. Cover Page
  2. Other Auerbach Publications
  3. Title Page
  4. Copyright Page
  5. Preface
    1. Purpose and Goals
    2. Intended Audience
    3. Resources Needed
    4. Approach
    5. Overview
    6. Keywords
    7. Problems
    8. References
    9. Code Availability
  6. Chapter 1: Introduction to Concurrent Programming and Components
    1. 1.1 Introduction
    2. 1.2 Chapter Goals
    3. 1.3 What is Concurrent Programming?
    4. 1.4 Components
    5. 1.5 Types of Concurrent Programming
    6. 1.6 Conclusion
    7. 1.7 Further Reading
    8. 1.8 Problems
  7. Chapter 2: Threads and Program Contexts
    1. 2.1 Introduction
    2. 2.2 Chapter Goals
    3. 2.3 Writing Threads in Java
    4. 2.4 A Simple Execution Model
    5. 2.5 Program Safety
    6. 2.6 Deadlock
    7. 2.7 Conclusion
    8. 2.8 Further Reading
    9. 2.9 Problems
  8. Chapter 3: Designing and Implementing Concurrent Programs with State Diagrams
    1. 3.1 Introduction
    2. 3.2 Chapter Goals
    3. 3.3 Background
    4. 3.4 Steps to Create a Concurrent Program
    5. 3.5 The Producer/Consumer Problem
    6. 3.6 Why Passive Objects are Components
    7. 3.7 Gas Station Simulation Problem
    8. 3.8 Conclusion
    9. 3.9 Further Reading
    10. 3.10 Problems
  9. Chapter 4: Identifiers, Variables, Objects, and Collection Classes
    1. 4.1 Introduction
    2. 4.2 Chapter Goals
    3. 4.3 Identifiers and Variables
    4. 4.4 Java Identifiers and Variables
    5. 4.5 Primitives
    6. 4.6 Objects
    7. 4.7 Collection Classes in Java
    8. 4.8 Further Reading
    9. 4.9 Problems
  10. Chapter 5: Programming to an Interface
    1. 5.1 Introduction
    2. 5.2 Chapter Goals
    3. 5.3 Reuse with Interfaces
    4. 5.4 Programming to a Promise
    5. 5.5 Dynamic Polymorphism
    6. 5.6 Using Multiple Interfaces
    7. 5.7 Implementing the SortedPrintTable
    8. 5.8 Using the SortedPrintTable
    9. 5.9 Expression Trees
    10. 5.10 Further Reading
    11. 5.11 Problems
  11. Chapter 6: Exceptions in Java
    1. 6.1 Introduction
    2. 6.2 Chapter Goals
    3. 6.3 How to Handle Errors Incorrectly
    4. 6.4 Java Exception Handling
    5. 6.5 Checked and Unchecked Exceptions
    6. 6.6 Writing Exceptions
    7. 6.7 Further Reading
    8. 6.8 Problems
  12. Chapter 7: Implementing an Animator Component Using the Java Event Model
    1. 7.1 Introduction
    2. 7.2 Chapter Goals
    3. 7.3 A Very Simple Animator
    4. 7.4 Adding a Speed Control to the Animator
    5. 7.5 Implementing a Generic Animator
    6. 7.6 Implementing the Animator Using the Java Event Model
    7. 7.7 Event Multicaster
    8. 7.8 Further Reading
    9. 7.9 Problems
  13. Chapter 8: Cooperative Synchronization
    1. 8.1 Introduction
    2. 8.2 Chapter Goals
    3. 8.3 Cooperative and Competitive Synchronization
    4. 8.4 Coordinating Threads Using Long Sleep Times
    5. 8.5 Using Wait and Notify to Coordinate Threads
    6. 8.6 A Solution with a Hidden Race Condition
    7. 8.7 Solving the Race Condition
    8. 8.8 Notification Objects
    9. 8.9 Animating the Gas Station Problem
    10. 8.10 Further Reading
    11. 8.11 Problems
  14. Chapter 9: Combining Concurrent Techniques
    1. 9.1 Introduction
    2. 9.2 Chapter Goals
    3. 9.3 A First-In/First-Out Binary Semaphore
    4. 9.4 Readers/Writers Problem
    5. 9.5 An Improved Gas Station Simulation
    6. 9.6 Improving the Animator
    7. 9.7 Conclusion
    8. 9.8 Further Reading
    9. 9.9 Problems
  15. Chapter 10: Organizing the Problem for Reuse: Reuse of Utility Classes
    1. 10.1 Introduction
    2. 10.2 Chapter Goals
    3. 10.3 Types of Reuse
    4. 10.4 Finding Commonality in Code
    5. 10.5 Reuse by Copy
    6. 10.6 Procedural Reuse in Java
    7. 10.7 Classification: Reuse by Extension
    8. 10.8 Composition: Reuse by Delegation
    9. 10.9 Defining the Java Event Model by Extending a Vector
    10. 10.10 Using Cohesion and Coupling to Evaluate Designs
    11. 10.11 Conclusion
    12. 10.12 Further Reading
    13. 10.13 Problems
  16. Chapter 11: Object-Oriented Design
    1. 11.1 Introduction
    2. 11.2 Chapter Goals
    3. 11.3 Organizing Objects
    4. 11.4 Choosing Composition or Classification
    5. 11.5 Conclusion
    6. 11.6 Further Reading
    7. 11.7 Problems
  17. Chapter 12: Program Management in Java
    1. 12.1 Introduction
    2. 12.2 Chapter Goals
    3. 12.3 What is Program Management?
    4. 12.4 Implementation Attributes not Defined in Java
    5. 12.5 Implementation Attributes Defined in Java
    6. 12.6 Packages
    7. 12.7 Further Reading
  18. Chapter 13: Distributed Programming Using RMI
    1. 13.1 Introduction
    2. 13.2 Chapter Goals
    3. 13.3 A Brief History of Distributed Computing
    4. 13.4 Overview of RMI
    5. 13.5 Implementing a Simple Program Using RMI
    6. 13.6 Migrating and Non-Migrating Objects
    7. 13.7 Chat Program
    8. 13.8 Conclusions
    9. 13.9 Further Reading
    10. 13.10 Problems
  19. Appendix A: Key Words
  20. References
    1. URLs

Product information

  • Title: Creating Components
  • Author(s): Charles W. Kann
  • Release date: September 2017
  • Publisher(s): Auerbach Publications
  • ISBN: 9781135505905