Search in sources :

Example 1 with SoftFindListener

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;
}
Also used : Proxifier(org.fagu.fmv.soft.utils.Proxifier) SoftFindListener(org.fagu.fmv.soft.find.SoftFindListener)

Aggregations

SoftFindListener (org.fagu.fmv.soft.find.SoftFindListener)1 Proxifier (org.fagu.fmv.soft.utils.Proxifier)1