Interface ContinuousWatcher<T extends ContinuousListener>
- Type Parameters:
T
- Type of listener this watcher will propagate message to.
public interface ContinuousWatcher<T extends ContinuousListener>
Interface by which all ContinuousWatchers ensure similar operation.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(T listener) Add a listener of the supported type to this watcher.getName()
The name of this watcher -- the mark it will make on sessions to watch.boolean
hasListener
(T listener) Returns true if the provided listener has been added to this watcher.
-
Method Details
-
addListener
Add a listener of the supported type to this watcher.- Parameters:
listener
- Listener to inform when a watched event triggers.- Throws:
CoreTokenException
-
getName
String getName()The name of this watcher -- the mark it will make on sessions to watch.- Returns:
- The name of this watcher.
-
hasListener
Returns true if the provided listener has been added to this watcher.- Parameters:
listener
- The listener to check.- Returns:
- Whether the listener has been added.
-