Interface ReplayStatusChangedHandlerRegistry<S extends ReplayStatusChangedHandlerRegistry<S>>
- Type Parameters:
S- the type of the registry itself, used for fluent interfacing
- All Known Implementing Classes:
SimpleEventHandlingComponent
@Internal
public interface ReplayStatusChangedHandlerRegistry<S extends ReplayStatusChangedHandlerRegistry<S>>
Registry for subscribing
ReplayStatusChangedHandler instances.
Components implementing this interface accept replay status changed handler subscriptions, allowing dynamic registration of replay status change behavior following the same pattern as event handler registration.
Example usage:
ReplayStatusChangedHandlerRegistry registry = ...;
registry.subscribe((statusChange, context) -> {
if (statusChange.status() == ReplayStatus.REPLAY) {
repository.deleteAll();
}
return MessageStream.empty();
});
- Since:
- 5.1.0
- Author:
- Simon Zambrovski, Stefan Dragisic, Steven van Beelen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionsubscribe(ReplayStatusChangedHandler replayStatusChangedHandler) Subscribes a replay status changed handler to this registry.
-
Method Details
-
subscribe
Subscribes a replay status changed handler to this registry.The handler will be invoked when the
ReplayStatuschanged. Multiple handlers can be subscribed, and all will be invoked when the replay status changes.- Parameters:
replayStatusChangedHandler- the replay status changed handler to subscribe, must not benull- Returns:
- this registry instance for method chaining
-