jdk/test/javax/management/monitor/CounterMonitorTest.java
author lana
Thu, 26 Dec 2013 12:04:16 -0800
changeset 23010 6dadb192ad81
parent 5506 202f599c92aa
child 26623 11289cf5c8fc
permissions -rw-r--r--
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013 Summary: updated files with 2011, 2012 and 2013 years according to the file's last updated date Reviewed-by: tbell, lancea, chegar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 4981829
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Test that the counter monitor, when running in difference mode,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 *          emits a notification every time the threshold is exceeded.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * @author Luis-Miguel Alventosa
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * @run clean CounterMonitorTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * @run build CounterMonitorTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * @run main CounterMonitorTest
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
import javax.management.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import javax.management.monitor.*;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
public class CounterMonitorTest implements NotificationListener {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    // threshold number
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
    private Number threshold = new Integer(2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    // modulus number
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    private Number modulus = new Integer(7);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    // offset number
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    private int offset = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    // difference mode flag
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    private boolean differenceModeFlag = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    // notify flag
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    private boolean notifyFlag = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    // granularity period
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    private int granularityperiod = 500;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
    // counter values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    private int[] values = new int[] {4, 6, 9, 11};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    // time to wait for notification (in seconds)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    private int timeout = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    // flag to notify that a message has been received
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    private volatile boolean messageReceived = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
    // MBean class
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    public class StdObservedObject implements StdObservedObjectMBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        public Object getNbObjects() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
            return count;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        public void setNbObjects(Object n) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            count = n;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
        private Object count= null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    // MBean interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
    public interface StdObservedObjectMBean {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
        public Object getNbObjects();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
        public void setNbObjects(Object n);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    // Notification handler
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    public void handleNotification(Notification notification,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
                                   Object handback) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
        MonitorNotification n = (MonitorNotification) notification;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        echo("\tInside handleNotification...");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
        String type = n.getType();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
            if (type.equals(MonitorNotification.THRESHOLD_VALUE_EXCEEDED)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
                echo("\t\t" + n.getObservedAttribute() +
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
                     " has reached or exceeded the threshold");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
                echo("\t\tDerived Gauge = " + n.getDerivedGauge());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
                messageReceived = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
                synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                    notifyAll();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                echo("\t\tSkipping notification of type: " + type);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
            echo("\tError in handleNotification!");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
            e.printStackTrace(System.out);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * Update the counter and check for notifications
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    public void thresholdNotification() throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        CounterMonitor counterMonitor = new CounterMonitor();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            MBeanServer server = MBeanServerFactory.newMBeanServer();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
            String domain = server.getDefaultDomain();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
            // Create a new CounterMonitor MBean and add it to the MBeanServer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
            echo(">>> CREATE a new CounterMonitor MBean");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
            ObjectName counterMonitorName = new ObjectName(
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                            domain + ":type=" + CounterMonitor.class.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            server.registerMBean(counterMonitor, counterMonitorName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
            echo(">>> ADD a listener to the CounterMonitor");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
            counterMonitor.addNotificationListener(this, null, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
            // MANAGEMENT OF A STANDARD MBEAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
            echo(">>> CREATE a new StdObservedObject MBean");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            ObjectName stdObsObjName =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
                new ObjectName(domain + ":type=StdObservedObject");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            StdObservedObject stdObsObj = new StdObservedObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
            server.registerMBean(stdObsObj, stdObsObjName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
            echo(">>> SET the attributes of the CounterMonitor:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            counterMonitor.addObservedObject(stdObsObjName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            echo("\tATTRIBUTE \"ObservedObject\"    = " + stdObsObjName);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            counterMonitor.setObservedAttribute("NbObjects");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            echo("\tATTRIBUTE \"ObservedAttribute\" = NbObjects");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
            counterMonitor.setNotify(notifyFlag);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
            echo("\tATTRIBUTE \"Notify\"            = " + notifyFlag);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
            counterMonitor.setInitThreshold(threshold);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
            echo("\tATTRIBUTE \"Threshold\"         = " + threshold);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
            counterMonitor.setGranularityPeriod(granularityperiod);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
            echo("\tATTRIBUTE \"GranularityPeriod\" = " + granularityperiod);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
            counterMonitor.setModulus(modulus);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
            echo("\tATTRIBUTE \"Modulus\"           = " + modulus);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
            counterMonitor.setDifferenceMode(differenceModeFlag);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            echo("\tATTRIBUTE \"DifferenceMode\"    = " + differenceModeFlag);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
            echo(">>> START the CounterMonitor");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
            counterMonitor.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
            // Set initial value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
            Integer data = new Integer(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
            echo(">>> Set data = " + data.intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
            Attribute attrib = new Attribute("NbObjects", data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
            server.setAttribute(stdObsObjName, attrib);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
            // Wait for granularity period (multiplied by 2 for sure)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
            Thread.sleep(granularityperiod * 2);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
            // Loop through the values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
            for (int i = 0; i < values.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                data = new Integer(values[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                echo(">>> Set data = " + data.intValue());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                attrib = new Attribute("NbObjects", data);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                server.setAttribute(stdObsObjName, attrib);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                echo("\tdoWait in Counter Monitor");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
                doWait();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                // Check if notification was received
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                if (messageReceived) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                    echo("\tOKAY: Notification received");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                    echo("\tError: notification missed or not emitted");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                    throw new IllegalStateException("Notification lost");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                messageReceived = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
        } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
            counterMonitor.stop();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
        echo(">>> Bye! Bye!");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     * Wait until timeout reached
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    void doWait() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        for (int i = 0; i < timeout; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
            echo("\tdoWait: Waiting for " + timeout + " seconds. " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
                 "i = " + i + ", messageReceived = " + messageReceived);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
            if (messageReceived) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
                synchronized (this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
                    wait(1000);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
            } catch (InterruptedException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
                // OK: Ignore...
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
     * Print message
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    void echo(String message) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        System.out.println(message);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
     * Standalone entry point.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * Run the test and report to stdout.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    public static void main (String args[]) throws Exception {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
        CounterMonitorTest test = new CounterMonitorTest();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
        test.thresholdNotification();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
}