NetBeans Lookup API Sample - plugin detail

Lookup API Sample

NetBeans Plugin - NetBeans Lookup API Sample
Plugin owner: geertjan
Added: 2008-08-24
License: CDDL
Category: NetBeans Rich Client Platform
Downloaded: 1,814 times
 0, by 0 users

Plugin Log Show log

Versions available

Download plugin   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


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.