Java Code Examples for javax.management.monitor.MonitorNotification#getType()
The following examples show how to use
javax.management.monitor.MonitorNotification#getType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AttributeArbitraryDataTypeTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); counterMessageReceived = true; } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); gaugeMessageReceived = true; } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); stringMessageReceived = true; } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 2
Source File: AttributeArbitraryDataTypeTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); counterMessageReceived = true; } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); gaugeMessageReceived = true; } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); stringMessageReceived = true; } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 3
Source File: AttributeArbitraryDataTypeTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 4
Source File: AttributeArbitraryDataTypeTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 5
Source File: AttributeArbitraryDataTypeTest.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 6
Source File: AttributeArbitraryDataTypeTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 7
Source File: AttributeArbitraryDataTypeTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 8
Source File: AttributeArbitraryDataTypeTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 9
Source File: AttributeArbitraryDataTypeTest.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 10
Source File: AttributeArbitraryDataTypeTest.java From hottub with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 11
Source File: AttributeArbitraryDataTypeTest.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 12
Source File: AttributeArbitraryDataTypeTest.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }
Example 13
Source File: AttributeArbitraryDataTypeTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public void handleNotification(Notification notification, Object handback) { MonitorNotification n = (MonitorNotification) notification; echo("\tInside handleNotification..."); String type = n.getType(); try { if (type.equals(MonitorNotification. THRESHOLD_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { counterMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. THRESHOLD_HIGH_VALUE_EXCEEDED)) { echo("\t\t" + n.getObservedAttribute() + " has reached or exceeded the high threshold"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { gaugeMessageReceived = true; notifyAll(); } } else if (type.equals(MonitorNotification. STRING_TO_COMPARE_VALUE_MATCHED)) { echo("\t\t" + n.getObservedAttribute() + " matches the string-to-compare value"); echo("\t\tDerived Gauge = " + n.getDerivedGauge()); echo("\t\tTrigger = " + n.getTrigger()); synchronized (this) { stringMessageReceived = true; notifyAll(); } } else { echo("\t\tSkipping notification of type: " + type); } } catch (Exception e) { echo("\tError in handleNotification!"); e.printStackTrace(System.out); } }