Class WatcherToggle<T>
java.lang.Object
io.fabric8.kubernetes.client.utils.WatcherToggle<T>
- All Implemented Interfaces:
Watcher<T>
public class WatcherToggle<T> extends Object implements Watcher<T>
A utility class to enable and disable callbacks to a watcher instance.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.Watcher
Watcher.Action -
Constructor Summary
Constructors Constructor Description WatcherToggle(Watcher<T> delegate, boolean enabled) -
Method Summary
Modifier and Type Method Description voiddisable()voidenable()voideventReceived(Watcher.Action action, T resource)voidonClose(KubernetesClientException cause)Run when the watcher finally closes.
-
Constructor Details
-
Method Details
-
disable
public void disable() -
enable
public void enable() -
eventReceived
- Specified by:
eventReceivedin interfaceWatcher<T>
-
onClose
Description copied from interface:WatcherRun when the watcher finally closes.
-