public void handleNotification(Notification notification, Object handback) { echo(">>> Received notification: " + notification); if (notification instanceof MonitorNotification) { String type = notification.getType(); if (type.equals(MonitorNotification.RUNTIME_ERROR)) { MonitorNotification mn = (MonitorNotification) notification; echo("\tType: " + mn.getType()); echo("\tTimeStamp: " + mn.getTimeStamp()); echo("\tObservedObject: " + mn.getObservedObject()); echo("\tObservedAttribute: " + mn.getObservedAttribute()); echo("\tDerivedGauge: " + mn.getDerivedGauge()); echo("\tTrigger: " + mn.getTrigger()); synchronized (this) { messageReceived = true; notifyAll(); } } } }
public void handleNotification(Notification n, Object hb) { System.out.println("\tReceived notification: " + n.getType()); if (n instanceof MonitorNotification) { MonitorNotification mn = (MonitorNotification) n; System.out.println("\tSource: " + mn.getSource()); System.out.println("\tType: " + mn.getType()); System.out.println("\tTimeStamp: " + mn.getTimeStamp()); System.out.println("\tObservedObject: " + mn.getObservedObject()); System.out.println("\tObservedAttribute: " + mn.getObservedAttribute()); System.out.println("\tDerivedGauge: " + mn.getDerivedGauge()); System.out.println("\tTrigger: " + mn.getTrigger()); } }
public void handleNotification(Notification notification, Object handback) { echo(">>> Received notification: " + notification); if (notification instanceof MonitorNotification) { String type = notification.getType(); if (type.equals(MonitorNotification.RUNTIME_ERROR)) { MonitorNotification mn = (MonitorNotification) notification; echo("\tType: " + mn.getType()); echo("\tTimeStamp: " + mn.getTimeStamp()); echo("\tObservedObject: " + mn.getObservedObject()); echo("\tObservedAttribute: " + mn.getObservedAttribute()); echo("\tDerivedGauge: " + mn.getDerivedGauge()); echo("\tTrigger: " + mn.getTrigger()); messageReceived = true; } } }