Java – what is netbean lookup?

It's hard for me to understand that Basically, this lookup API is used to maintain the loosely coupled nature between modules So basically, can the service provider and consumer modules communicate with each other using the lookup API?

But what I don't understand is:

Lookup is like a package full of objects of that kind? Can anyone give a simpler analogy?

Is it correct to create dependencies and implement lookuplistener in the service consumer? Consumers clearly rely on providers

So what is the implementation of lookuplistener? Is it your lookup? Then, if there is a class mapping of another module, it will be stored as an object in the lookup of the lookup implementation lookuplistener?

So look a bit like a package that can store another module's class and its methods?

Is this the right process to determine the choice?

>In the topcomponent (view), you implement the lookup listener and the action listener. > You create a new object (from another module) > associatelookup (lookups. Singleton (FFF)); Again, confused with this line: what exactly is associatelookup () doing? > result = Utilities. actionsGlobalContext(). lookupResult(Browser1.class); What is this line doing? What is the result? Does it contain the browser1 class (from other modules)? > result. addLookupListener(this); Why add listeners to the results? What do we listen to on topcomponent and why? > Are you finished?

Finally, to further confuse me, how does the node API enter play?

Solution

There is a good discussion of the NetBeans platform lookup API

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>