Package org.openhab.core.service
Interface ReadyService
@NonNullByDefault
public interface ReadyService
Registry for
ReadyMarker
s.
Services may use the ReadyService
in order to denote they have completed loading/processing something.
Interested parties may register as a tracker for ReadyMarker
s. Optionally they can provide a
ReadyMarkerFilter
in order to restrict the ReadyMarker
s they get notified for.
Alternatively, isReady(ReadyMarker)
can be used to check for any given ReadyMarker
.
- Author:
- Simon Kaufmann - Initial contribution
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Tracker for changes related toReadyMarker
registrations. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isReady
(ReadyMarker readyMarker) void
markReady
(ReadyMarker readyMarker) Register the given marker as being "ready".void
registerTracker
(ReadyService.ReadyTracker readyTracker) Adds the given tracker.void
registerTracker
(ReadyService.ReadyTracker readyTracker, ReadyMarkerFilter filter) Adds the given tracker.void
unmarkReady
(ReadyMarker readyMarker) Removes the given marker.void
unregisterTracker
(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:
true
if the givenReadyMarker
is registered as being "ready".
-
registerTracker
Adds the given tracker. It will be notified for allReadyMarker
s.- 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
-
-