corner imagecorner image
IDEPlatformPluginsDocs & SupportCommunityPartners

NetBeans Lookup API Sample - plugin detail

Lookup API Sample

NetBeans Plugin - NetBeans Lookup API Sample
Plugin owner: geertjan
Website:
Added: 2008-08-24
Last updated: 2008-08-24
NetBeans Versions: 6.1
License: CDDL
Category: NetBeans Rich Client Platform
Size: 0.03 MB
Downloaded: 620 times
Rating:
 0, by 0 users


Download plugin

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:

1219577625801_figure-3.png

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

1219577351634_figure-1.png

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.



What's new in this version

[ You have to be logged in to be able to comment. ]

User Comments

There are no comments yet.