public class AgentXResponseEvent extends EventObject
source| Constructor and Description |
|---|
AgentXResponseEvent(Object source,
AgentXTarget target,
org.snmp4j.smi.Address peerAddress,
AgentXPDU request,
AgentXResponsePDU response,
Object userObject)
Creates an
AgentXResponseEvent instance. |
AgentXResponseEvent(Object source,
AgentXTarget target,
org.snmp4j.smi.Address peerAddress,
AgentXPDU request,
AgentXResponsePDU response,
Object userObject,
Exception error)
Creates an
ResponseEvent instance with an exception object
indicating a message processing error. |
| Modifier and Type | Method and Description |
|---|---|
Exception |
getError()
Gets the exception object from the exception that has been generated
when the request processing has failed due to an error.
|
org.snmp4j.smi.Address |
getPeerAddress()
Gets the transport address of the response sender.
|
AgentXPDU |
getRequest()
Gets the request PDU.
|
AgentXResponsePDU |
getResponse()
Gets the response PDU.
|
AgentXTarget |
getTarget() |
Object |
getUserObject()
Gets the user object that has been supplied to the asynchronous request
AgentX.send(AgentXPDU pdu, AgentXTarget target,
TransportMapping transport). |
protected void |
setPeerAddress(org.snmp4j.smi.Address peerAddress) |
protected void |
setRequest(AgentXPDU request) |
protected void |
setResponse(AgentXResponsePDU response) |
protected void |
setUserObject(Object userObject) |
getSource, toStringpublic AgentXResponseEvent(Object source, AgentXTarget target, org.snmp4j.smi.Address peerAddress, AgentXPDU request, AgentXResponsePDU response, Object userObject)
AgentXResponseEvent instance.source - the event source.target - the target where the request has been sent to.peerAddress - the transport address of the entity that send the response.request - the request AgentXPDU (must not be null).response - the AgentXResponsePDU or null if the request timed out.userObject - an optional user object.public AgentXResponseEvent(Object source, AgentXTarget target, org.snmp4j.smi.Address peerAddress, AgentXPDU request, AgentXResponsePDU response, Object userObject, Exception error)
ResponseEvent instance with an exception object
indicating a message processing error.source - the event source.target - the target where the request has been sent to.peerAddress - the transport address of the entity that send the response.request - the request PDU (must not be null).response - the response PDU or null if the request timed out.userObject - an optional user object.error - an Exception.public AgentXPDU getRequest()
PDU.protected final void setPeerAddress(org.snmp4j.smi.Address peerAddress)
protected final void setRequest(AgentXPDU request)
protected final void setResponse(AgentXResponsePDU response)
public AgentXResponsePDU getResponse()
null will be returned.protected final void setUserObject(Object userObject)
public Object getUserObject()
AgentX.send(AgentXPDU pdu, AgentXTarget target,
TransportMapping transport).public Exception getError()
Exception instance.public org.snmp4j.smi.Address getPeerAddress()
Address of the command responder that send
this response, or null if no response has been received
within the time-out interval or if an error occured (see
getError()).public AgentXTarget getTarget()
Copyright © 2020 SNMP4J.org. All rights reserved.