Package org.opennms.netmgt.snmp.mock
Class MockSnmpStrategy
- java.lang.Object
 - 
- org.opennms.netmgt.snmp.mock.MockSnmpStrategy
 
 
- 
- All Implemented Interfaces:
 SnmpStrategy
public class MockSnmpStrategy extends Object implements SnmpStrategy
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static SnmpAgentAddressALL_AGENTS 
- 
Constructor Summary
Constructors Constructor Description MockSnmpStrategy() 
- 
Method Summary
 
 - 
 
- 
- 
Field Detail
- 
ALL_AGENTS
public static final SnmpAgentAddress ALL_AGENTS
 
 - 
 
- 
Method Detail
- 
getOidContainer
protected PropertyOidContainer getOidContainer(SnmpAgentConfig agentConfig)
 
- 
getOidContainer
protected PropertyOidContainer getOidContainer(SnmpAgentAddress aa)
 
- 
createWalker
public SnmpWalker createWalker(SnmpAgentConfig agentConfig, String name, CollectionTracker tracker)
- Specified by:
 createWalkerin interfaceSnmpStrategy
 
- 
set
public SnmpValue set(SnmpAgentConfig agentConfig, SnmpObjId oid, SnmpValue value)
- Specified by:
 setin interfaceSnmpStrategy
 
- 
set
public SnmpValue[] set(SnmpAgentConfig agentConfig, SnmpObjId[] oids, SnmpValue[] values)
- Specified by:
 setin interfaceSnmpStrategy
 
- 
get
public SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid)
- Specified by:
 getin interfaceSnmpStrategy
 
- 
get
public SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
 getin interfaceSnmpStrategy
 
- 
getAsync
public CompletableFuture<SnmpValue[]> getAsync(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
 getAsyncin interfaceSnmpStrategy
 
- 
getNext
public SnmpValue getNext(SnmpAgentConfig agentConfig, SnmpObjId oid)
- Specified by:
 getNextin interfaceSnmpStrategy
 
- 
getNext
public SnmpValue[] getNext(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
 getNextin interfaceSnmpStrategy
 
- 
getBulk
public SnmpValue[] getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
- Specified by:
 getBulkin interfaceSnmpStrategy
 
- 
registerForTraps
public void registerForTraps(TrapNotificationListener listener, InetAddress address, int snmpTrapPort) throws IOException
- Specified by:
 registerForTrapsin interfaceSnmpStrategy- Throws:
 IOException
 
- 
registerForTraps
public void registerForTraps(TrapNotificationListener listener, int snmpTrapPort) throws IOException
- Specified by:
 registerForTrapsin interfaceSnmpStrategy- Throws:
 IOException
 
- 
registerForTraps
public void registerForTraps(TrapNotificationListener listener, InetAddress address, int snmpTrapPort, List<SnmpV3User> snmpv3Users) throws IOException
- Specified by:
 registerForTrapsin interfaceSnmpStrategy- Throws:
 IOException
 
- 
unregisterForTraps
public void unregisterForTraps(TrapNotificationListener listener) throws IOException
- Specified by:
 unregisterForTrapsin interfaceSnmpStrategy- Throws:
 IOException
 
- 
getValueFactory
public SnmpValueFactory getValueFactory()
- Specified by:
 getValueFactoryin interfaceSnmpStrategy
 
- 
getV1TrapBuilder
public SnmpV1TrapBuilder getV1TrapBuilder()
- Specified by:
 getV1TrapBuilderin interfaceSnmpStrategy
 
- 
getV2TrapBuilder
public SnmpTrapBuilder getV2TrapBuilder()
- Specified by:
 getV2TrapBuilderin interfaceSnmpStrategy
 
- 
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
 
- 
setDataForAddress
public static void setDataForAddress(SnmpAgentAddress agentAddress, org.springframework.core.io.Resource resource) throws IOException
- Throws:
 IOException
 
- 
updateIntValue
public static void updateIntValue(SnmpAgentAddress agentAddress, String oid, int value)
 
- 
updateStringValue
public static void updateStringValue(SnmpAgentAddress agentAddress, String oid, String value)
 
- 
updateCounter32Value
public static void updateCounter32Value(SnmpAgentAddress agentAddress, String oid, long value)
 
- 
updateCounter64Value
public static void updateCounter64Value(SnmpAgentAddress agentAddress, String oid, BigInteger value)
 
- 
removeHost
public static void removeHost(SnmpAgentAddress agentAddr)
 
- 
resetData
public static void resetData()
 
 - 
 
 -