Class SnmpUtils


  • public abstract class SnmpUtils
    extends java.lang.Object
    • Constructor Detail

      • SnmpUtils

        public SnmpUtils()
    • Method Detail

      • getConfig

        public static java.util.Properties getConfig()
      • getColumns

        public static java.util.List<SnmpValue> getColumns​(SnmpAgentConfig agentConfig,
                                                           java.lang.String name,
                                                           SnmpObjId oid)
                                                    throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getOidValues

        public static java.util.Map<SnmpInstId,​SnmpValue> getOidValues​(SnmpAgentConfig agentConfig,
                                                                             java.lang.String name,
                                                                             SnmpObjId oid)
                                                                      throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • setConfig

        public static void setConfig​(java.util.Properties config)
      • isClassBasedStrategyInstantiable

        public static boolean isClassBasedStrategyInstantiable()
      • setStrategyResolver

        public static void setStrategyResolver​(StrategyResolver strategyResolver)
      • unsetStrategyResolver

        public static void unsetStrategyResolver()
      • getStrategyClassName

        public static java.lang.String getStrategyClassName()
      • registerForTraps

        public static void registerForTraps​(TrapNotificationListener listener,
                                            java.net.InetAddress address,
                                            int snmpTrapPort,
                                            java.util.List<SnmpV3User> snmpUsers)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • registerForTraps

        public static void registerForTraps​(TrapNotificationListener listener,
                                            java.net.InetAddress address,
                                            int snmpTrapPort)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • unregisterForTraps

        public static void unregisterForTraps​(TrapNotificationListener listener,
                                              java.net.InetAddress address,
                                              int snmpTrapPort)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalEngineID

        public static java.lang.String getLocalEngineID()
      • getHexString

        public static java.lang.String getHexString​(byte[] raw)
      • getProtoCounter63Value

        public static java.lang.Long getProtoCounter63Value​(SnmpValue value)
      • getProtoCounter63Value

        public static java.lang.Long getProtoCounter63Value​(byte[] valBytes)

        Enable the SNMP code to digest OCTET STRING values acting as proto-Counter64 objects as seen in the FCMGMT-MIB with the following comment:

        There is one and only one statistics table for each individual port. For all objects in statistics table, if the object is not supported by the conn unit then the high order bit is set to 1 with all other bits set to zero. The high order bit is reserved to indicate if the object if supported or not. All objects start at a value of zero at hardware initialization and continue incrementing till end of 63 bits and then wrap to zero.

        See Also:
        NMS-5423