/** * @return human readable string. */ public String toString() { StringBuffer buffer = new StringBuffer(100); buffer.append(getClass().getName()).append("@").append(System.identityHashCode(this)).append("{"); buffer.append(" objectName=").append(getObjectName()); buffer.append(" alreadyNotified=").append(getAlreadyNotified()); buffer.append(" threshold=").append(getThreshold()); buffer.append(" derivedGauge=").append(getDerivedGauge()); buffer.append(" derivedGaugeTS=").append(getDerivedGaugeTimeStamp()); buffer.append(" lastValue=").append(getLastValue()); return buffer.append("}").toString(); }
/** * Sends the notification * * @param object the observedObject. * @param type the notification type. * @param timestamp the time of the notification. * @param message the human readable message to send. * @param attribute the attribute name. * @param gauge the derived gauge. * @param trigger the trigger value. */ void sendNotification(ObservedObject object, String type, long timestamp, String message, String attribute, Object gauge, Object trigger) { MonitorNotification n = callback.createNotification(type, monitorName, timestamp, message, gauge, attribute, object.getObjectName(), trigger); monitor.sendNotification(n); }
try mbeanInfo = server.getMBeanInfo(object.getObjectName()); try value = server.getAttribute(object.getObjectName(), monitor.getObservedAttribute());