Package net.sourceforge.processdash.hier

Examples of net.sourceforge.processdash.hier.DashHierarchy$Event


      Event[] events = history.getLatestPage();

      System.out.println("Events In the latestPage are : ");
      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " + anEvent.getClass().getName()
            + "  FullFormattedMessage: "
            + anEvent.getFullFormattedMessage());
      }
    } catch (Exception e)
    {
      System.out.println("Caught Exception : " + " Name : "
          + e.getClass().getName() + " Message : " + e.getMessage()
View Full Code Here


                {
                    ArrayOfEvent aoe = (ArrayOfEvent) value;
                    Event[] evts = aoe.getEvent();
                    for (int evtID = 0; evtID < evts.length; ++evtID)
                    {
                        Event anEvent = evts[evtID];
                        System.out.println("\n----------" + "\n Event ID: "
                                + anEvent.getKey() + "\n Event: "
                                + anEvent.getClass().getName()
                                + "\n FullFormattedMessage: "
                                + anEvent.getFullFormattedMessage()
                                + "\n VM Reference: "
                                + anEvent.getVm().getVm().get_value()
                                + "\n----------\n");
                    }
                } else if (value instanceof VmEvent)
                {
                    VmEvent anEvent = (VmEvent) value;
                    System.out.println("\n----------" + "\n Event ID: "
                            + anEvent.getKey() + "\n Event: "
                            + anEvent.getClass().getName()
                            + "\n FullFormattedMessage: "
                            + anEvent.getFullFormattedMessage()
                            + "\n VM Reference: "
                            + anEvent.getVm().getVm().get_value()
                            + "\n----------\n");
                }
                System.out.println("===============");
            }
        }
View Full Code Here

        evtMgr.createCollectorForEvents(eventFilter);
      Event[] events = ehc.getLatestPage();

      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " +
            anEvent.getClass().getName());
      }
    }
    si.getServerConnection().logout();
  }
View Full Code Here

    ServiceInstance si = new ServiceInstance(
        new URL(args[0]), args[1], args[2], true);

    // get the latest event and print it out
    EventManager evtMgr = si.getEventManager();
    Event latestEvent = evtMgr.getLatestEvent();
    printEvent(latestEvent);

    // create a filter spec for querying events
    EventFilterSpec efs = new EventFilterSpec();
    // limit to only error and warning
View Full Code Here

        super.setUp();
        data = new MockDataContext();
        baseTimeLog = new MockBaseTimeLog();
        timeLog = new TimeLogModifications(baseTimeLog);
        approver = new MockApprover();
        hierarchy = new DashHierarchy(null);
        hierarchy.loadXML(openFile("hier3.xml"), new DashHierarchy(null));
        recorder = new TimingMetricsRecorder(timeLog, data, hierarchy, approver);
        recorder.refreshMetrics();

        expectedTimes = new HashMap();
        for (int i = 0; i < TIMELOG3_CONTENTS.length; i++) {
View Full Code Here

    if (loggingModelIsTiming != isTiming) {
      printErr("We disagree with the logging model on whether or not the timer is running.");
      foundErr = true;
    }

    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (!checkTimeData(cKey.path(), expectedTimes[a][b][c]))
            foundErr = true;
        }
      }
    }
View Full Code Here

    }
    return gvitm;
  }

  private String getPathStr(int[] newPath) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    PropertyKey key = PropertyKey.ROOT;
    for (int i = 0; i < newPath.length; i++)
      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }
View Full Code Here

      key = hier.getChildKey(key, newPath[i]);
    return key.path();
  }

  private int[] getPathFor(String path) {
    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (path.equals(cKey.path()))
            return new int[] { a, b, c };
        }
      }
    }
View Full Code Here

        long newTimestamp = hierarchyFile.lastModified();
        if (newTimestamp == 0 || newTimestamp == hierarchyTimestamp)
            return;

        // load the new data from the hierarchy file
        DashHierarchy newHier = new DashHierarchy(hierarchy.dataPath);
        newHier.loadXML(hierarchyFile.getPath(), templates);
        // alter our current hierarchy to match the new changes
        DashController.getHierarchyAlterer().mergeChangesFrom(newHier);
        // update the timestamp to indicate success
        hierarchyTimestamp = newTimestamp;
    }
View Full Code Here

        while (row < tree.getRowCount())
            tree.expandRow(row++);
    }

    private DashHierarchy getHierarchyToDisplay() {
        DashHierarchy result = new DashHierarchy("");
        result.copy(ctx.getHierarchy());
        pruneForDisplay(result, PropertyKey.ROOT);
        maybeCreateDefaultHierarchy(result);
        return result;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.hier.DashHierarchy$Event

Copyright © 2018 www.massapicom. 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.