summaryrefslogtreecommitdiffstats
path: root/jrt/src/com/yahoo/jrt/TargetWatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'jrt/src/com/yahoo/jrt/TargetWatcher.java')
-rw-r--r--jrt/src/com/yahoo/jrt/TargetWatcher.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/TargetWatcher.java b/jrt/src/com/yahoo/jrt/TargetWatcher.java
new file mode 100644
index 00000000000..9b75bcdede4
--- /dev/null
+++ b/jrt/src/com/yahoo/jrt/TargetWatcher.java
@@ -0,0 +1,19 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.jrt;
+
+
+/**
+ * Interface used to notify when a {@link Target} becomes
+ * invalid. Listening is controlled with the {@link Target#addWatcher
+ * Target.addWatcher} and {@link Target#removeWatcher
+ * Target.removeWatcher} methods.
+ **/
+public interface TargetWatcher {
+
+ /**
+ * Invoked when a target becomes invalid.
+ *
+ * @param target the target that has become invalid.
+ **/
+ public void notifyTargetInvalid(Target target);
+}