summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 09:55:42 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-08-03 09:55:42 +0000
commitb0ad224f91ccc68d816cfbd3555004734aefc97f (patch)
tree7d12d2d30a39e617f5cf1c628249c5a919f7431d /java/sca
parent2680abf5b80548b8fefd94f59599879dc24592a1 (diff)
A change I have sitting on my disc in case we decide do maintain content in the monitor.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@800275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-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();
+ }
}