java - netbeans ServiceProvider not returning variable from method -



java - netbeans ServiceProvider not returning variable from method -

i working on desktop application netbeans platform. app place map in topcomponent , user can draw layout , other elements on it. element stored in hashmap. added hashmap mouse gestures.

at point, need retrieve hashmap object when pressing button on ui. button in modulea , hashmap, maps , objects defined in moduleb. trying using serviceprovider pattern. code follows:

package org.dhviz.design.gui.buttontoolbar; //...annotations here... public final class associateconstopipes implements actionlistener { @override public void actionperformed(actionevent e) { collection<? extends dhvizjmapviewerinterface> allhandlers1 = lookup. getdefault().lookupall(dhvizjmapviewerinterface.class); (dhvizjmapviewerinterface chi1 : allhandlers1) { system.out.println(chi1.getmapconsumerhashmap()); } } }

the class implementing interface defined , placed in module b:

@serviceprovider(service = dhvizjmapviewerinterface.class) public class dhvizjmapviewer extends jmapviewer implements dhvizjmapviewerinterface { protected linkedhashmap<integer, mapmarkerelementimpl> mapsourcehashmap = null; protected linkedhashmap<integer, mapmarkerelementimpl> mapconsumerhashmap = null; protected linkedhashmap<integer, mappipeimpl> mappipehashmap = null; public dhvizjmapviewer() { this(new memorytilecache(), 8); //map controllers interaction on map mapcontroller = new defaultdhvizmapcontroller(this); this.setscrollwrapenabled(false); } public dhvizjmapviewer(tilecache tilecache, int downloadthreadcount) { //some init code here }

i expect hashmap when pressing button empty object although can see hashmap not empty.

can explain me why, please? give thanks much

java netbeans lookup netbeans-platform service-provider

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -