NetBeans Lookup API Sample - plugin detail
Lookup API Sample
Plugin owner: |
geertjan |
Website: |
|
Added: |
2008-08-24 |
License: |
CDDL |
Category: |
NetBeans Rich Client Platform |
Downloaded: |
1,525 times |
Rating: |
|
Plugin Log |
Show log
There is no log for this plugin so far. |
|
Versions available
|
Download size: 0.03 MB
|
Last Update: 2008-08-24
|
What's new in this version
Verifications for NetBeans versions
Plugin is not subject to any verification
Introduction
NetBeans Module Suite project that demonstrates how loosely coupled communication is supported via the NetBeans Platform's Lookups.forPath() registration/retrieval method.
After you install the module, go here in the New Project dialog to get the sample:

When you finish the dialog above, you will have a sample consisting of 4 modules:

The module "extensionpointinterface" exposes an interface providing a method called "getMessage()". This interface is implemented in "messageprovider1" and "messageprovider2". Both these modules register their implementations in their respective layer files. Finally, the "messagereader" module looks up the path to the folder where the implementations are registered. It then looks up all implementations of the interface. The "messagereader" module has no dependencies on the modules that provide the implementations, but only on the module that provides the interface. In this way the "messagereader" is loosely coupled to the implementations, which can be extended or removed without the "messagereader" being impacted in any way.
Thanks to Toni Epple for this sample.
|
[ You have to be logged in to be able to comment. ]
User Comments
There are no comments yet.
|