Package org.rzo.yajsw.os.ms.win.w32

Examples of org.rzo.yajsw.os.ms.win.w32.Pdh$Advapi32


    }

    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {

        String propertyBase = "\\Web Service(_Total)\\";
        Pdh pdh = new Pdh();

        for (MeasurementScheduleRequest request : metrics) {
            double value = pdh.getRawValue(propertyBase + request.getName());
            report.addData(new MeasurementDataNumeric(request, value));
        }
    }
View Full Code Here


    }

    public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception {

        String propertyBase = "\\Web Service(" + getSiteName() + ")\\";
        Pdh pdh = new Pdh();

        for (MeasurementScheduleRequest request : metrics) {
            if (request.getDataType() == DataType.CALLTIME) {
                log.debug("Calltime MeasurementScheduleRequest: " + request);
                CallTimeData callTimeData = new CallTimeData(request);
                this.responseTimeDelegate.parseLogs(callTimeData);
                report.addData(callTimeData);
            } else {
                double value = pdh.getRawValue(propertyBase + request.getName());
                report.addData(new MeasurementDataNumeric(request, value));
            }
        }
    }
View Full Code Here

    public TestPdh(String name) {
        super(name);
    }

    private void getValue(String key) throws Exception {
        Pdh pdh = new Pdh();

        traceln(key);
        assertGtEqZeroTrace("raw",
                            (long)pdh.getRawValue(key));
        assertGtEqZeroTrace("fmt",
                            (long)pdh.getFormattedValue(key));
    }
View Full Code Here

    private static boolean isCounter(long type) {
        return (type & Pdh.PERF_TYPE_COUNTER) == Pdh.PERF_TYPE_COUNTER;
    }

    private void getValue(String key) throws Exception {
        Pdh pdh = new Pdh();

        traceln(key + ": " + pdh.getDescription(key));
        traceln("counter=" + isCounter(pdh.getCounterType(key)));
        assertGtEqZeroTrace("raw",
                            (long)pdh.getRawValue(key));
        assertGtEqZeroTrace("fmt",
                            (long)pdh.getFormattedValue(key));
    }
View Full Code Here

        return;
      try
      {
        Class clazz = this.getClass().getClassLoader().loadClass("org.rzo.yajsw.os.ms.win.w32.Cluster");
        _cluster = clazz.newInstance();
        _clusterListener = new ClusterNodeChangeListener()
        {
          public void nodeChanged()
          {
            script.execute();
          }
View Full Code Here

    WndListner hotKeyHandler = new WndListner()
    {

      public int execute(int uMsg, int wParam, int lParam)
      {
        HotKey k = (HotKey) DummyWindow._hotKeys.get(new Integer(wParam));
        if (k == null)
          return 0;
        Collection listners = _keys.getCollection(k);
        if (listners == null)
          return 0;
View Full Code Here

    catch (InterruptedException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    HotKey k = _dummyWindow.new HotKey(mod, key);
    _listners.put(listner, k);
    _keys.put(k, listner);
  }
View Full Code Here

   * org.rzo.yajsw.os.Keyboard#unregisterHotKey(org.rzo.yajsw.os.Keyboard.
   * HotKeyListner)
   */
  public synchronized void unregisterHotKey(HotKeyListner listner)
  {
    HotKey k = (HotKey) _listners.get(listner);
    if (k == null)
      return;
    _listners.remove(listner);
    _keys.remove(k, listner);
    Collection listners = _keys.getCollection(k);
View Full Code Here

        _hWnd = MyUser32.INSTANCE.CreateWindowExA(0, _wndClass.lpszClassName, _wndClass.lpszClassName, 0, 0, 0, 0, 0, null, null, _hinstance,
            null);
        MyUser32.INSTANCE.ShowWindow(_hWnd, MyUser32.SW_HIDE);
        MyUser32.INSTANCE.UpdateWindow(_hWnd);

        MSG msg = new MSG();
        msg.size();
        int ret;
        do
        {
          ret = MyUser32.INSTANCE.GetMessageA(msg, _hWnd, 0, 0);
          // System.out.println("get message "+msg);
View Full Code Here

    catch (InterruptedException e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    WndListner hotKeyHandler = new WndListner()
    {

      public int execute(int uMsg, int wParam, int lParam)
      {
        HotKey k = (HotKey) DummyWindow._hotKeys.get(new Integer(wParam));
View Full Code Here

TOP

Related Classes of org.rzo.yajsw.os.ms.win.w32.Pdh$Advapi32

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.