use of org.fagu.fmv.soft.find.SoftFindListener in project fmv by f-agu.
the class SoftSearch method createAndfireEventFound.
/**
* @param founds
* @param softLocator
* @return
*/
private Soft createAndfireEventFound(Founds founds, SoftLocator softLocator) {
Soft soft = getProvider().createSoft(founds);
Proxifier<SoftFindListener> proxifier = new Proxifier<>(SoftFindListener.class);
proxifier.addAll(softFindListeners);
ServiceLoader.load(SoftFindListener.class).forEach(proxifier::add);
SoftFindListener softFindListener = proxifier.proxify();
softFindListener.eventFound(softLocator, soft);
return soft;
}
Aggregations