/** * Returns a {@link ReadyMarkerFilter} restricted to the given identifier. * * @param type * @return */ public ReadyMarkerFilter withIdentifier(@Nullable String identifier) { return new ReadyMarkerFilter(type, identifier); }
private void notifyTracker(ReadyTracker readyTracker, Consumer<ReadyMarker> action) { ReadyMarkerFilter f = trackers.get(readyTracker); markers.stream().filter(marker -> f.apply(marker)).forEach(action); }
@Reference public void setReadyService(final ReadyService readyService) { readyService.registerTracker(this, new ReadyMarkerFilter().withType(GenericThingProvider.XML_THING_TYPE)); }
@Activate protected synchronized void activate(ComponentContext componentContext) { readyService.registerTracker(this, new ReadyMarkerFilter().withType(XML_THING_TYPE)); for (ThingHandlerFactory factory : thingHandlerFactories) { handleThingHandlerFactoryAddition(getBundleName(factory)); } thingRegistry.addThingTracker(this); active = true; }
/** * Returns a {@link ReadyMarkerFilter} restricted to the given type. * * @param type * @return */ public ReadyMarkerFilter withType(@Nullable String type) { return new ReadyMarkerFilter(type, identifier); }
private void notifyTrackers(ReadyMarker readyMarker, Consumer<ReadyTracker> action) { trackers.entrySet().stream().filter(entry -> { return entry.getValue().apply(readyMarker); }).map(entry -> { return entry.getKey(); }).forEach(action); }
/** * Returns a {@link ReadyMarkerFilter} restricted to the given identifier. * * @param type * @return */ public ReadyMarkerFilter withIdentifier(@Nullable String identifier) { return new ReadyMarkerFilter(type, identifier); }
private void notifyTrackers(ReadyMarker readyMarker, Consumer<ReadyTracker> action) { trackers.entrySet().stream().filter(entry -> { return entry.getValue().apply(readyMarker); }).map(entry -> { return entry.getKey(); }).forEach(action); }
/** * Returns a {@link ReadyMarkerFilter} restricted to the given type. * * @param type * @return */ public ReadyMarkerFilter withType(@Nullable String type) { return new ReadyMarkerFilter(type, identifier); }
private void notifyTracker(ReadyTracker readyTracker, Consumer<ReadyMarker> action) { ReadyMarkerFilter f = trackers.get(readyTracker); markers.stream().filter(marker -> f.apply(marker)).forEach(action); }