NetBeans Lookup API Sample - plugin detail

Lookup API Sample

NetBeans Plugin - NetBeans Lookup API Sample
Plugin owner: geertjan
Website:
Added: 2008-08-24
License: CDDL
Category: NetBeans Rich Client Platform
Downloaded: 1,602 times
Rating:
 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



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.

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

User Comments

There are no comments yet.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo