public class Snmp4JStrategy extends Object implements SnmpStrategy
| Modifier and Type | Class and Description |
|---|---|
static class |
Snmp4JStrategy.RegistrationInfo |
| Constructor and Description |
|---|
Snmp4JStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected SnmpAgentConfig |
buildAgentConfig(String address,
int port,
int timeout,
int retries,
int securityLevel,
String securityName,
String authPassPhrase,
String authProtocol,
String privPassPhrase,
String privProtocol,
org.snmp4j.PDU pdu) |
protected SnmpAgentConfig |
buildAgentConfig(String address,
int port,
int timeout,
int retries,
String community,
org.snmp4j.PDU pdu) |
protected SnmpAgentConfig |
buildAgentConfig(String address,
int port,
int securityLevel,
String securityName,
String authPassPhrase,
String authProtocol,
String privPassPhrase,
String privProtocol,
org.snmp4j.PDU pdu) |
protected SnmpAgentConfig |
buildAgentConfig(String address,
int port,
String community,
org.snmp4j.PDU pdu) |
protected org.snmp4j.PDU |
buildPdu(Snmp4JAgentConfig agentConfig,
int pduType,
SnmpObjId[] oids,
SnmpValue[] values) |
void |
clearUsers() |
SnmpWalker |
createWalker(SnmpAgentConfig snmpAgentConfig,
String name,
CollectionTracker tracker)
SNMP4J createWalker implementation.
|
SnmpValue |
get(SnmpAgentConfig agentConfig,
SnmpObjId oid)
SNMP4J get helper that takes a single SnmpObjId
and calls get with an array.lenght =1 and returns
the first element of the returned array of SnmpValue.
|
SnmpValue[] |
get(SnmpAgentConfig agentConfig,
SnmpObjId[] oids)
SnmpGet implementation.
|
CompletableFuture<SnmpValue[]> |
getAsync(SnmpAgentConfig agentConfig,
SnmpObjId[] oids) |
SnmpValue[] |
getBulk(SnmpAgentConfig agentConfig,
SnmpObjId[] oid)
Not yet implemented.
|
byte[] |
getLocalEngineID() |
SnmpValue |
getNext(SnmpAgentConfig agentConfig,
SnmpObjId oid)
SNMP4J getNext implementation
|
SnmpValue[] |
getNext(SnmpAgentConfig agentConfig,
SnmpObjId[] oids)
SNMP GetNext implementation.
|
SnmpV1TrapBuilder |
getV1TrapBuilder() |
SnmpV2TrapBuilder |
getV2InformBuilder() |
SnmpTrapBuilder |
getV2TrapBuilder() |
SnmpV3TrapBuilder |
getV3InformBuilder() |
SnmpV3TrapBuilder |
getV3TrapBuilder() |
SnmpValueFactory |
getValueFactory() |
void |
registerForTraps(TrapNotificationListener listener,
InetAddress address,
int snmpTrapPort) |
void |
registerForTraps(TrapNotificationListener listener,
InetAddress address,
int snmpTrapPort,
List<SnmpV3User> snmpUsers) |
void |
registerForTraps(TrapNotificationListener listener,
int snmpTrapPort) |
protected SnmpValue[] |
send(Snmp4JAgentConfig agentConfig,
org.snmp4j.PDU pdu,
boolean expectResponse)
Sends and SNMP4J request PDU.
|
void |
sendTest(String agentAddress,
int port,
String community,
org.snmp4j.PDU pdu) |
SnmpValue[] |
set(SnmpAgentConfig agentConfig,
SnmpObjId[] oids,
SnmpValue[] values) |
SnmpValue |
set(SnmpAgentConfig agentConfig,
SnmpObjId oid,
SnmpValue value) |
void |
unregisterForTraps(TrapNotificationListener listener,
InetAddress address,
int snmpTrapPort) |
void |
unregisterForTraps(TrapNotificationListener listener,
int snmpTrapPort) |
public void clearUsers()
public SnmpWalker createWalker(SnmpAgentConfig snmpAgentConfig, String name, CollectionTracker tracker)
createWalker in interface SnmpStrategysnmpAgentConfig - name - tracker - public SnmpValue[] getBulk(SnmpAgentConfig agentConfig, SnmpObjId[] oid)
getBulk in interface SnmpStrategypublic SnmpValue set(SnmpAgentConfig agentConfig, SnmpObjId oid, SnmpValue value)
set in interface SnmpStrategypublic SnmpValue[] set(SnmpAgentConfig agentConfig, SnmpObjId[] oids, SnmpValue[] values)
set in interface SnmpStrategypublic SnmpValue get(SnmpAgentConfig agentConfig, SnmpObjId oid)
get in interface SnmpStrategyagentConfig - oid - public SnmpValue[] get(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
get in interface SnmpStrategyagentConfig - oids - public CompletableFuture<SnmpValue[]> getAsync(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
getAsync in interface SnmpStrategypublic SnmpValue getNext(SnmpAgentConfig agentConfig, SnmpObjId oid)
getNext in interface SnmpStrategyagentConfig - oid - public SnmpValue[] getNext(SnmpAgentConfig agentConfig, SnmpObjId[] oids)
getNext in interface SnmpStrategyagentConfig - oids - protected SnmpValue[] send(Snmp4JAgentConfig agentConfig, org.snmp4j.PDU pdu, boolean expectResponse)
protected org.snmp4j.PDU buildPdu(Snmp4JAgentConfig agentConfig, int pduType, SnmpObjId[] oids, SnmpValue[] values)
public SnmpValueFactory getValueFactory()
getValueFactory in interface SnmpStrategypublic void registerForTraps(TrapNotificationListener listener, InetAddress address, int snmpTrapPort, List<SnmpV3User> snmpUsers) throws IOException
registerForTraps in interface SnmpStrategyIOExceptionpublic void registerForTraps(TrapNotificationListener listener, InetAddress address, int snmpTrapPort) throws IOException
registerForTraps in interface SnmpStrategyIOExceptionpublic void registerForTraps(TrapNotificationListener listener, int snmpTrapPort) throws IOException
registerForTraps in interface SnmpStrategyIOExceptionpublic void unregisterForTraps(TrapNotificationListener listener, InetAddress address, int snmpTrapPort) throws IOException
unregisterForTraps in interface SnmpStrategyIOExceptionpublic void unregisterForTraps(TrapNotificationListener listener, int snmpTrapPort) throws IOException
unregisterForTraps in interface SnmpStrategyIOExceptionpublic SnmpV1TrapBuilder getV1TrapBuilder()
getV1TrapBuilder in interface SnmpStrategypublic SnmpTrapBuilder getV2TrapBuilder()
getV2TrapBuilder in interface SnmpStrategypublic SnmpV3TrapBuilder getV3TrapBuilder()
getV3TrapBuilder in interface SnmpStrategypublic SnmpV2TrapBuilder getV2InformBuilder()
getV2InformBuilder in interface SnmpStrategypublic SnmpV3TrapBuilder getV3InformBuilder()
getV3InformBuilder in interface SnmpStrategyprotected SnmpAgentConfig buildAgentConfig(String address, int port, String community, org.snmp4j.PDU pdu) throws UnknownHostException
UnknownHostExceptionprotected SnmpAgentConfig buildAgentConfig(String address, int port, int timeout, int retries, String community, org.snmp4j.PDU pdu) throws UnknownHostException
UnknownHostExceptionprotected SnmpAgentConfig buildAgentConfig(String address, int port, int securityLevel, String securityName, String authPassPhrase, String authProtocol, String privPassPhrase, String privProtocol, org.snmp4j.PDU pdu) throws UnknownHostException, Exception
UnknownHostExceptionExceptionprotected SnmpAgentConfig buildAgentConfig(String address, int port, int timeout, int retries, int securityLevel, String securityName, String authPassPhrase, String authProtocol, String privPassPhrase, String privProtocol, org.snmp4j.PDU pdu) throws UnknownHostException, Exception
UnknownHostExceptionExceptionpublic byte[] getLocalEngineID()
getLocalEngineID in interface SnmpStrategyCopyright © 2020. All rights reserved.