Package org.opends.server.snmp
Class SNMPMonitor
- java.lang.Object
-
- org.opends.server.snmp.SNMPMonitor
-
public class SNMPMonitor extends Object
The SNMPMonitor Class allows to get a singleton SNMPMonitor object allowing to access the JMX cn=monitor MBean.
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectNamepatternPattern to use to query the cn=monitor MBeans.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static longcounter32Value(long v)Wrapper for SNMP Counter32.static Longcounter32Value(Long V)Wrapper for SNMP Counter32.static longgauge32Value(long v)Latcher for SNMP Gauge32.static Longgauge32Value(Long V)Latcher for SNMP Gauge32.ObjectgetAttribute(String name, String attribute)Get the value of the attribute.ObjectgetAttribute(ObjectName name, String attribute)Gets the value of an attribute.ObjectNamegetConnectionHandler(ObjectName statistics)Return the ObjectName of the Connection Handler corresponding to the statistics name.Set<ObjectName>getConnectionHandlers()Return a Set of Connection Handler ObjectNames.Set<ObjectName>getConnectionHandlersStatistics()Gets the Connection Handlers Statistics MBean.ObjectNamegetConnectionHandlerStatistics(ObjectName connectionHandlerName)Returns the ObjectName of the Statistics Connection Handler name.static SNMPMonitorgetMonitor(MBeanServer server)Gets the singleton SNMPMonitor object.static IntegerintegerValue(Long V)Checker for SNMP INTEGER.static Byte[]string2ByteArray(String s)Wrapper for SNMP Byte[].
-
-
-
Field Detail
-
pattern
public static ObjectName pattern
Pattern to use to query the cn=monitor MBeans.
-
-
Method Detail
-
getMonitor
public static SNMPMonitor getMonitor(MBeanServer server)
Gets the singleton SNMPMonitor object.- Parameters:
server- The server- Returns:
- the SNMPMonitor mapping object.
-
getConnectionHandlersStatistics
public Set<ObjectName> getConnectionHandlersStatistics()
Gets the Connection Handlers Statistics MBean.- Returns:
- the Set of Connection Handlers Statistics. If Statistics do not exist then an empty Set is returned
-
getConnectionHandler
public ObjectName getConnectionHandler(ObjectName statistics)
Return the ObjectName of the Connection Handler corresponding to the statistics name.- Parameters:
statistics- ObjectName- Returns:
- the Connection Handler ObjectName, null otherwise
-
getConnectionHandlers
public Set<ObjectName> getConnectionHandlers()
Return a Set of Connection Handler ObjectNames.- Returns:
- the Set of ObjectNames, an empty Set if no connection handlers
-
getConnectionHandlerStatistics
public ObjectName getConnectionHandlerStatistics(ObjectName connectionHandlerName)
Returns the ObjectName of the Statistics Connection Handler name. corresponding to the Connection Handler name- Parameters:
connectionHandlerName- The connection handler name- Returns:
- the ObjectName of the statistics ObjectName, null if the statistics could not be found
-
getAttribute
public Object getAttribute(String name, String attribute)
Get the value of the attribute.- Parameters:
name- of Mbean as a Stringattribute- to look for- Returns:
- the value of the attribute, null if the attribute could not be found
-
getAttribute
public Object getAttribute(ObjectName name, String attribute)
Gets the value of an attribute.- Parameters:
name- of the Mbeanattribute- to look for- Returns:
- the value of the attribute, null if the attribute value could not be found
-
string2ByteArray
public static Byte[] string2ByteArray(String s)
Wrapper for SNMP Byte[].- Parameters:
s- value string- Returns:
- a Byte[]
-
counter32Value
public static long counter32Value(long v)
Wrapper for SNMP Counter32.- Parameters:
v- value- Returns:
- a counter32
-
counter32Value
public static Long counter32Value(Long V)
Wrapper for SNMP Counter32.- Parameters:
V- Value- Returns:
- a Counter32
-
gauge32Value
public static long gauge32Value(long v)
Latcher for SNMP Gauge32.- Parameters:
v- value- Returns:
- a gauge32
-
gauge32Value
public static Long gauge32Value(Long V)
Latcher for SNMP Gauge32.- Parameters:
V- value- Returns:
- a gauge32
-
-