Class PDHSession


  • public class PDHSession
    extends WinResource
    A PDHSession indicates a connection to the remote host. This object support to get pdh data from hosts which were not monitored by current collector.
    See Also:
    PDH
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCounter​(java.lang.String counter)
      Get a single counter from the given host with default timeout 30 seconds
      java.lang.String getCounter​(java.lang.String counter, long timeoutSeconds)
      Get a single counter from the given host with timeout
      java.util.List<java.lang.String> getCounters​(java.util.List<java.lang.String> counters)
      Get values for a list of counters from the given host with default timeout 30 seconds
      java.util.List<java.lang.String> getCounters​(java.util.List<java.lang.String> counters, long timeoutSeconds)
      Get values for a list of counters from the given host
      java.lang.String getDiscover​(java.lang.String category, long timeoutSeconds)
      Get values for a list of category from the given host
      java.lang.String getEnum​(java.lang.String object, long timeoutSeconds)
      Get values for a list of object from the given host
      java.lang.String getRatioCounter​(java.lang.String counter)
      Get values for a ratio counter from the given host with default timeout 30 seconds
      java.lang.String getRatioCounter​(java.lang.String counter, long timeoutSeconds)
      Get values for a list of ratio counters from the given host
      java.util.List<java.lang.String> getRatioCounters​(java.util.List<java.lang.String> counters)
      Get values for a list of ratio counters from the given host with default timeout 30 seconds
      java.util.List<java.lang.String> getRatioCounters​(java.util.List<java.lang.String> counters, long timeoutSeconds)
      Get values for a list of ratio counters from the given host
      • Methods inherited from class com.logicmonitor.common.sse.utils.SSEResource

        register, unregister
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getCounter

        public java.lang.String getCounter​(java.lang.String counter)
                                    throws java.io.IOException,
                                           java.lang.InterruptedException,
                                           java.util.concurrent.ExecutionException
        Get a single counter from the given host with default timeout 30 seconds
        Parameters:
        counter -
        Returns:
        - value of counter, in string format
        Throws:
        java.io.IOException - If some other I/O error occurs
        java.lang.InterruptedException - If wait request interrupt
        java.util.concurrent.ExecutionException - If wait request execution failed
      • getCounter

        public java.lang.String getCounter​(java.lang.String counter,
                                           long timeoutSeconds)
                                    throws java.io.IOException,
                                           java.lang.InterruptedException,
                                           java.util.concurrent.ExecutionException
        Get a single counter from the given host with timeout
        Parameters:
        counter - The counter of this pdh
        timeoutSeconds - Timeout(seconds)
        Returns:
        - value of counter, in string format
        Throws:
        java.io.IOException - If some other I/O error occurs
        java.lang.InterruptedException - If wait request interrupt
        java.util.concurrent.ExecutionException - If wait request execution failed
      • getCounters

        public java.util.List<java.lang.String> getCounters​(java.util.List<java.lang.String> counters)
                                                     throws java.io.IOException,
                                                            java.lang.InterruptedException,
                                                            java.util.concurrent.ExecutionException
        Get values for a list of counters from the given host with default timeout 30 seconds
        Parameters:
        counters - - counters to get
        Returns:
        - values of counters, in given order of counters parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getCounters

        public java.util.List<java.lang.String> getCounters​(java.util.List<java.lang.String> counters,
                                                            long timeoutSeconds)
                                                     throws java.io.IOException,
                                                            java.lang.InterruptedException,
                                                            java.util.concurrent.ExecutionException
        Get values for a list of counters from the given host
        Parameters:
        counters - - counters to get
        timeoutSeconds - timeout (seconds)
        Returns:
        - values of counters, in given order of counters parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getDiscover

        public java.lang.String getDiscover​(java.lang.String category,
                                            long timeoutSeconds)
                                     throws java.io.IOException,
                                            java.lang.InterruptedException,
                                            java.util.concurrent.ExecutionException
        Get values for a list of category from the given host
        Parameters:
        category - - category to get
        timeoutSeconds - timeout (seconds)
        Returns:
        - values of category, in given order of category parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getEnum

        public java.lang.String getEnum​(java.lang.String object,
                                        long timeoutSeconds)
                                 throws java.io.IOException,
                                        java.lang.InterruptedException,
                                        java.util.concurrent.ExecutionException
        Get values for a list of object from the given host
        Parameters:
        object - - object to get
        timeoutSeconds - timeout (seconds)
        Returns:
        - values of object, in given order of object parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getRatioCounter

        public java.lang.String getRatioCounter​(java.lang.String counter)
                                         throws java.io.IOException,
                                                java.lang.InterruptedException,
                                                java.util.concurrent.ExecutionException
        Get values for a ratio counter from the given host with default timeout 30 seconds
        Parameters:
        counter - - ratio counters to get
        Returns:
        - value of this ratio counter
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getRatioCounter

        public java.lang.String getRatioCounter​(java.lang.String counter,
                                                long timeoutSeconds)
                                         throws java.io.IOException,
                                                java.lang.InterruptedException,
                                                java.util.concurrent.ExecutionException
        Get values for a list of ratio counters from the given host
        Parameters:
        counter - - ratio counters to get
        timeoutSeconds - timeout in seconds
        Returns:
        - values of ratio counters, in given order of ratio counters parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getRatioCounters

        public java.util.List<java.lang.String> getRatioCounters​(java.util.List<java.lang.String> counters)
                                                          throws java.io.IOException,
                                                                 java.lang.InterruptedException,
                                                                 java.util.concurrent.ExecutionException
        Get values for a list of ratio counters from the given host with default timeout 30 seconds
        Parameters:
        counters - - ratio counters to get
        Returns:
        - values of ratio counters, in given order of ratio counters parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • getRatioCounters

        public java.util.List<java.lang.String> getRatioCounters​(java.util.List<java.lang.String> counters,
                                                                 long timeoutSeconds)
                                                          throws java.io.IOException,
                                                                 java.lang.InterruptedException,
                                                                 java.util.concurrent.ExecutionException
        Get values for a list of ratio counters from the given host
        Parameters:
        counters - - ratio counters to get
        timeoutSeconds - timeout in seconds
        Returns:
        - values of ratio counters, in given order of ratio counters parameters
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException