public interface Watcher<T>
Modifier and Type | Interface and Description |
---|---|
static class |
Watcher.Action |
Modifier and Type | Method and Description |
---|---|
void |
eventReceived(Watcher.Action action,
T resource)
Handle the given event.
|
default void |
onClose()
Invoked when the watcher is gracefully closed.
|
void |
onClose(WatcherException cause)
Invoked when the watcher closes due to an Exception.
|
default boolean |
reconnecting()
If the Watcher can reconnect itself after an error
|
default boolean reconnecting()
Currently only used to indicate if the Watch should ignore the watch reconnect limit
void eventReceived(Watcher.Action action, T resource)
Should not be implemented with long-running logic as that may lead to memory issues.
default void onClose()
void onClose(WatcherException cause)
Should not be implemented with long-running logic as that may lead to memory issues.
cause
- What caused the watcher to be closed.Copyright © 2015–2024 Red Hat. All rights reserved.