Class PDHSession
- java.lang.Object
-
- com.logicmonitor.common.sse.utils.SSEResource
-
- com.santaba.agent.groovyapi.win32.WinResource
-
- com.santaba.agent.groovyapi.win32.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
-
-
Field Summary
Fields Modifier and Type Field Description static long
_DEFAULT_TIMEOUT
static int
RETRY_INTERVAL
-
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 secondsjava.lang.String
getCounter(java.lang.String counter, long timeoutSeconds)
Get a single counter from the given host with timeoutjava.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 secondsjava.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 hostjava.lang.String
getDiscover(java.lang.String category, long timeoutSeconds)
Get values for a list of category from the given hostjava.lang.String
getEnum(java.lang.String object, long timeoutSeconds)
Get values for a list of object from the given hostjava.lang.String
getRatioCounter(java.lang.String counter)
Get values for a ratio counter from the given host with default timeout 30 secondsjava.lang.String
getRatioCounter(java.lang.String counter, long timeoutSeconds)
Get values for a list of ratio counters from the given hostjava.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 secondsjava.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.santaba.agent.groovyapi.win32.WinResource
isReleased, release
-
-
-
-
Field Detail
-
RETRY_INTERVAL
public static final int RETRY_INTERVAL
- See Also:
- Constant Field Values
-
_DEFAULT_TIMEOUT
public static final long _DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
-
-
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 occursjava.lang.InterruptedException
- If wait request interruptjava.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 pdhtimeoutSeconds
- Timeout(seconds)- Returns:
- - value of counter, in string format
- Throws:
java.io.IOException
- If some other I/O error occursjava.lang.InterruptedException
- If wait request interruptjava.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 gettimeoutSeconds
- 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 gettimeoutSeconds
- 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 gettimeoutSeconds
- 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 gettimeoutSeconds
- 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 gettimeoutSeconds
- 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
-
-