Package org.mc4j.ems.connection.bean.attribute

Examples of org.mc4j.ems.connection.bean.attribute.EmsAttribute.refresh()


    EmsBean bean = context.getParentResourceComponent().getEmsConnection().getBean(SOADiscoveryComponent.SYSTEM_BEAN);
    String resourceKey = null;

    try {
        EmsAttribute versionAttribute = bean.getAttribute(SOADiscoveryComponent.VERSION_NUMBER);   
        versionNumber = (String) versionAttribute.refresh();
        } catch (Exception e) {
          versionNumber = "";
        }

    for (Iterator i = jmxResources.iterator(); i.hasNext();) {
View Full Code Here


    if (emsbean != null) {
        try {
          EmsAttribute alertAttribute = emsbean.getAttribute(ALERTS_ATTRIBUTE);
          if (alertAttribute != null) {
            Vector<Hashtable> notifList = null;
            notifList = (Vector<Hashtable>) alertAttribute.refresh();
          for (Hashtable notifHash : notifList) {
              long timestamp = (new Long ((String) notifHash.get(NOTIFICATION_TIMESTAMP_LONG))).longValue();
               
              Event event = new Event(getEventType(),
                ((String)notifHash.get(NOTIFICATION_TYPE)),
View Full Code Here

          String metricName = request.getName();
          if (metricName.equals (SUCCESS_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + SUCCESS_PROCESSED);
            Integer processed = new Integer(0);
            if (attribute != null) {
              processed = (Integer) attribute.refresh();
            }
            success = processed.intValue();
            counter += processed.intValue();
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(FAILED_METRIC_NAME)) {
View Full Code Here

            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(FAILED_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + FAILED_PROCESSED);
              Integer processed = new Integer(0);
              if (attribute != null) {
                processed = (Integer) attribute.refresh();
              }
              failed = processed.intValue();
              counter += processed.intValue();
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(PROCESSINGTIME_METRIC_NAME)) {
View Full Code Here

              failed = processed.intValue();
              counter += processed.intValue();
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(PROCESSINGTIME_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + PROCESSING_TIME);
            Double processed = (Double) attribute.refresh();
            if (processed != null) {
                processed = new Double(processed.doubleValue() / 1000000);
              report.addData(new MeasurementDataNumeric(request, processed));
            } else {
              report.addData(new MeasurementDataNumeric(request, new Double(0)));
View Full Code Here

            }
          } else if (metricName.equals(BYTESPROCESSED_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_PROCESSED);
            Long bytesProcessed = new Long(0);
            if (attribute != null) {
              bytesProcessed = (Long) attribute.refresh();
              counterBytesProcessed = bytesProcessed.longValue();
            }
            report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
          } else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_FAILED);
View Full Code Here

            report.addData(new MeasurementDataNumeric(request, new Double(bytesProcessed.doubleValue())));
          } else if (metricName.equals(BYTESFAILED_METRIC_NAME)) {
            EmsAttribute attribute = this.bean.getAttribute(actionName + " " + OVERALL_BYTES_FAILED);
            Long bytesFailed = new Long(0);
            if (attribute != null) {
              bytesFailed = (Long) attribute.refresh();
              counterBytesFailed += bytesFailed.longValue();
            }
            report.addData(new MeasurementDataNumeric(request, new Double(bytesFailed.doubleValue())));           
          }
        }
View Full Code Here

      long bytesFailed = 0;
        for (MeasurementScheduleRequest request : requests) {
          String metricName = request.getName();
          if (metricName.equals(OVERALL_MESSAGE_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_MESSAGE_COUNT);
            overallMessages = (Integer) attribute.refresh();
            report.addData(new MeasurementDataNumeric(request, new Double(overallMessages.doubleValue())));
          } else if (metricName.equals(OVERALL_TIME_PROCESSED_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_TIME_PROCESSED);
            Long overallTimeProcessed = (Long) attribute.refresh();
            if (overallTimeProcessed != null) {
View Full Code Here

            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_MESSAGE_COUNT);
            overallMessages = (Integer) attribute.refresh();
            report.addData(new MeasurementDataNumeric(request, new Double(overallMessages.doubleValue())));
          } else if (metricName.equals(OVERALL_TIME_PROCESSED_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_TIME_PROCESSED);
            Long overallTimeProcessed = (Long) attribute.refresh();
            if (overallTimeProcessed != null) {
              Double timeProcessed = new Double(overallTimeProcessed.doubleValue() / 1000000);
              report.addData(new MeasurementDataNumeric(request, timeProcessed));
            } else {
              report.addData(new MeasurementDataNumeric(request, new Double(0)));
View Full Code Here

            }
          } else if (metricName.equals(OVERALL_BYTES_PROCESSED_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_PROCESSED);
            Long processed = new Long(0);
            if (attribute != null) {
              processed = (Long) attribute.refresh();
              bytesProcessed = processed.longValue();
            }
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(OVERALL_BYTES_FAILED_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_FAILED);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.