public final class SnmpResponseHandler extends Object implements SnmpHandler
Constructor and Description |
---|
SnmpResponseHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getFirstResponseString() |
SnmpSyntax |
getFirstResponseValue() |
SnmpVarBind |
getFirstResponseVarBind()
Returns the recovered SNMP system object identifier, if any.
|
SnmpPduPacket |
getResponse() |
String |
getResponseString(int index) |
SnmpSyntax |
getResponseValue(int index) |
SnmpVarBind |
getResponseVarBind(int index) |
int |
getResponseVarBindCount() |
void |
snmpInternalError(SnmpSession sess,
int err,
SnmpSyntax obj)
This method is invoked when an internal error occurs on the SNMP session.
|
void |
snmpReceivedPdu(SnmpSession sess,
int command,
SnmpPduPacket pkt)
The method that handles a returned packet from the remote agent.
|
void |
snmpTimeoutError(SnmpSession sess,
SnmpSyntax pkt)
This method is invoked when the session fails to receive a response to a
particular packet.
|
public void snmpReceivedPdu(SnmpSession sess, int command, SnmpPduPacket pkt)
snmpReceivedPdu
in interface SnmpHandler
sess
- The SNMP session that received the result.command
- The SNMP command.pkt
- The SNMP packet that was received.public void snmpInternalError(SnmpSession sess, int err, SnmpSyntax obj)
snmpInternalError
in interface SnmpHandler
sess
- The SNMP session that received the result.err
- The err.obj
- The syntax object.public void snmpTimeoutError(SnmpSession sess, SnmpSyntax pkt)
snmpTimeoutError
in interface SnmpHandler
sess
- The SNMP session that received the result.pkt
- The SNMP packet that was received.public SnmpPduPacket getResponse()
public SnmpVarBind getFirstResponseVarBind()
public SnmpSyntax getFirstResponseValue()
public String getFirstResponseString()
public SnmpSyntax getResponseValue(int index)
public String getResponseString(int index)
public SnmpVarBind getResponseVarBind(int index)
public int getResponseVarBindCount()
Copyright © 2021. All rights reserved.