summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/monitor/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/monitor/src')
-rw-r--r--java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java26
-rw-r--r--java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java5
2 files changed, 31 insertions, 0 deletions
diff --git a/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java b/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java
index 946e785b8c..0d94af0070 100644
--- a/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java
+++ b/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java
@@ -114,6 +114,22 @@ public abstract class Monitor {
*/
public abstract void popContext();
+ /**
+ * Remove all of the context strings from the
+ * context stack
+ */
+ public abstract void clearContext();
+
+ /**
+ * A utility function for raising a warning. It creates the problem and
+ * adds it to the monitor
+ *
+ * @param monitor
+ * @param reportingObject
+ * @param messageBundle
+ * @param messageId
+ * @param messageParameters
+ */
public static void warning (Monitor monitor,
Object reportingObject,
String messageBundle,
@@ -131,6 +147,16 @@ public abstract class Monitor {
}
}
+ /**
+ * A utility function for raising an error. It creates the problem and
+ * adds it to the monitor
+ *
+ * @param monitor
+ * @param reportingObject
+ * @param messageBundle
+ * @param messageId
+ * @param messageParameters
+ */
public static void error (Monitor monitor,
Object reportingObject,
String messageBundle,
diff --git a/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java b/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java
index e4bb2a2201..48aeda3a55 100644
--- a/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java
+++ b/java/sca/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java
@@ -124,4 +124,9 @@ public class MonitorImpl extends Monitor {
public void popContext() {
contextStack.pop();
}
+
+ @Override
+ public void clearContext() {
+ contextStack.clear();
+ }
}