Package org.opennms.netmgt.snmp.joesnmp
Class JoeSnmpStrategy
- java.lang.Object
-
- org.opennms.netmgt.snmp.joesnmp.JoeSnmpStrategy
-
- All Implemented Interfaces:
SnmpStrategy
public class JoeSnmpStrategy extends java.lang.Object implements SnmpStrategy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJoeSnmpStrategy.RegistrationInfo
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description JoeSnmpStrategy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SnmpWalkercreateWalker(SnmpAgentConfig snmpAgentConfig, java.lang.String name, CollectionTracker tracker)SnmpValueget(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid)SnmpValue[]get(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids)java.util.concurrent.CompletableFuture<SnmpValue[]>getAsync(SnmpAgentConfig agentConfig, SnmpObjId[] oids)SnmpValue[]getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oids)byte[]getLocalEngineID()SnmpValuegetNext(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid)SnmpValue[]getNext(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids)SnmpV1TrapBuildergetV1TrapBuilder()SnmpV2TrapBuildergetV2InformBuilder()SnmpTrapBuildergetV2TrapBuilder()SnmpV3TrapBuildergetV3InformBuilder()SnmpV3TrapBuildergetV3TrapBuilder()SnmpValueFactorygetValueFactory()voidregisterForTraps(TrapNotificationListener listener, int snmpTrapPort)voidregisterForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort)voidregisterForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort, java.util.List<SnmpV3User> snmpv3Users)static voidsend(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduRequest pdu)static voidsend(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduTrap trap)static voidsendTest(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduRequest pdu)static voidsendTest(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduTrap pdu)SnmpValue[]set(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids, SnmpValue[] values)SnmpValueset(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid, SnmpValue value)voidunregisterForTraps(TrapNotificationListener listener, int snmpTrapPort)voidunregisterForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort)
-
-
-
Method Detail
-
createWalker
public SnmpWalker createWalker(SnmpAgentConfig snmpAgentConfig, java.lang.String name, CollectionTracker tracker)
- Specified by:
createWalkerin interfaceSnmpStrategy
-
set
public SnmpValue set(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid, SnmpValue value)
- Specified by:
setin interfaceSnmpStrategy
-
set
public SnmpValue[] set(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids, SnmpValue[] values)
- Specified by:
setin interfaceSnmpStrategy
-
get
public SnmpValue get(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid)
- Specified by:
getin interfaceSnmpStrategy
-
get
public SnmpValue[] get(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids)
- Specified by:
getin interfaceSnmpStrategy
-
getAsync
public java.util.concurrent.CompletableFuture<SnmpValue[]> getAsync(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
getAsyncin interfaceSnmpStrategy
-
getNext
public SnmpValue getNext(SnmpAgentConfig snmpAgentConfig, SnmpObjId oid)
- Specified by:
getNextin interfaceSnmpStrategy
-
getNext
public SnmpValue[] getNext(SnmpAgentConfig snmpAgentConfig, SnmpObjId[] oids)
- Specified by:
getNextin interfaceSnmpStrategy
-
getBulk
public SnmpValue[] getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
getBulkin interfaceSnmpStrategy
-
registerForTraps
public void registerForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort) throws java.io.IOException
- Specified by:
registerForTrapsin interfaceSnmpStrategy- Throws:
java.io.IOException
-
registerForTraps
public void registerForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort, java.util.List<SnmpV3User> snmpv3Users) throws java.io.IOException
- Specified by:
registerForTrapsin interfaceSnmpStrategy- Throws:
java.io.IOException
-
registerForTraps
public void registerForTraps(TrapNotificationListener listener, int snmpTrapPort) throws java.io.IOException
- Specified by:
registerForTrapsin interfaceSnmpStrategy- Throws:
java.io.IOException
-
unregisterForTraps
public void unregisterForTraps(TrapNotificationListener listener, java.net.InetAddress address, int snmpTrapPort)
- Specified by:
unregisterForTrapsin interfaceSnmpStrategy
-
unregisterForTraps
public void unregisterForTraps(TrapNotificationListener listener, int snmpTrapPort)
- Specified by:
unregisterForTrapsin interfaceSnmpStrategy
-
getValueFactory
public SnmpValueFactory getValueFactory()
- Specified by:
getValueFactoryin interfaceSnmpStrategy
-
getV1TrapBuilder
public SnmpV1TrapBuilder getV1TrapBuilder()
- Specified by:
getV1TrapBuilderin interfaceSnmpStrategy
-
getV2TrapBuilder
public SnmpTrapBuilder getV2TrapBuilder()
- Specified by:
getV2TrapBuilderin interfaceSnmpStrategy
-
send
public static void send(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduTrap trap) throws java.lang.Exception- Throws:
java.lang.Exception
-
send
public static void send(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduRequest pdu) throws java.lang.Exception- Throws:
java.lang.Exception
-
sendTest
public static void sendTest(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduRequest pdu) throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
sendTest
public static void sendTest(java.lang.String destAddr, int destPort, java.lang.String community, SnmpPduTrap pdu) throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
getV3TrapBuilder
public SnmpV3TrapBuilder getV3TrapBuilder()
- Specified by:
getV3TrapBuilderin interfaceSnmpStrategy
-
getV2InformBuilder
public SnmpV2TrapBuilder getV2InformBuilder()
- Specified by:
getV2InformBuilderin interfaceSnmpStrategy
-
getV3InformBuilder
public SnmpV3TrapBuilder getV3InformBuilder()
- Specified by:
getV3InformBuilderin interfaceSnmpStrategy
-
getLocalEngineID
public byte[] getLocalEngineID()
- Specified by:
getLocalEngineIDin interfaceSnmpStrategy
-
-