Notify all metric reporters when metric registry has been changed

With existing implementation, it is difficult to notify the
metric reports on metric registry changes. With this commit,
we can spontaneously notify all reporters about the metric
registry changes, so that newly added metrics can be automatically
reported to third party monitoring system.

Change-Id: I1273194553900f6bb03e2ef6bb1b54838af1da00
diff --git a/utils/misc/src/main/java/org/onlab/metrics/MetricsReporter.java b/utils/misc/src/main/java/org/onlab/metrics/MetricsReporter.java
new file mode 100644
index 0000000..68088a5
--- /dev/null
+++ b/utils/misc/src/main/java/org/onlab/metrics/MetricsReporter.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onlab.metrics;
+
+/**
+ * Interface of reporter that reports all metrics value to third party monitor.
+ */
+public interface MetricsReporter {
+
+    /**
+     * Starts to report a set of metrics to the monitoring server.
+     */
+    void startReport();
+
+    /**
+     * Stops reporting metrics.
+     */
+    void stopReport();
+
+    /**
+     * Restarts metrics reporter.
+     */
+    void restartReport();
+
+    /**
+     * Notifies the changes on metric registry.
+     */
+    void notifyMetricsChange();
+}