Chapter FourLoosely Coupled Communication
4.1. Registration and Discovery
Chapter 3 included sample code showing you how to create the right architecture for validators. Despite the fact that the example correctly presents the use of various inter-module dependencies of the NetBeans runtime container, it contains a lot of boilerplate code that does nothing except ensure proper communication between the modules. Specifically:
- A significant amount of code in the
Validator
example registers all available validators. There is a hash map that holds all the validators and methods to allow dynamic additions and removals. The rest of the code—the actual code that does the work and looks up the right validator and performs the validation—is in fact in ...
Get Rich Client Programming: Plugging into the NetBeans Platform now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.