Package org.openhab.core.service
Interface ReadyService
@NonNullByDefault
public interface ReadyService
Registry for
ReadyMarkers.
Services may use the ReadyService in order to denote they have completed loading/processing something.
Interested parties may register as a tracker for ReadyMarkers. Optionally they can provide a
ReadyMarkerFilter in order to restrict the ReadyMarkers they get notified for.
Alternatively, isReady(ReadyMarker) can be used to check for any given ReadyMarker.
- Author:
- Simon Kaufmann - Initial contribution
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceTracker for changes related toReadyMarkerregistrations. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisReady(ReadyMarker readyMarker) voidmarkReady(ReadyMarker readyMarker) Register the given marker as being "ready".voidregisterTracker(ReadyService.ReadyTracker readyTracker) Adds the given tracker.voidregisterTracker(ReadyService.ReadyTracker readyTracker, ReadyMarkerFilter filter) Adds the given tracker.voidunmarkReady(ReadyMarker readyMarker) Removes the given marker.voidunregisterTracker(ReadyService.ReadyTracker readyTracker) Removes the given tracker.
-
Method Details
-
markReady
Register the given marker as being "ready".- Parameters:
readyMarker-
-
unmarkReady
Removes the given marker.- Parameters:
readyMarker-
-
isReady
- Parameters:
readyMarker-- Returns:
trueif the givenReadyMarkeris registered as being "ready".
-
registerTracker
Adds the given tracker. It will be notified for allReadyMarkers.- Parameters:
readyTracker-
-
registerTracker
Adds the given tracker. It will be notified for a ReadyMarker changes related to those which match the given filter criteria.The provided tracker will get notified about the addition of all existing readyMarkers right away.
- Parameters:
readyTracker-filter-
-
unregisterTracker
Removes the given tracker. The provided tracker will get notified about the removal of all existing readyMarkers right away.- Parameters:
readyTracker-
-