Package org.snmp4j.agent.agentx.event
Class PingEvent<A extends org.snmp4j.smi.Address>
java.lang.Object
java.util.EventObject
org.snmp4j.agent.agentx.event.PingEvent<A>
- All Implemented Interfaces:
Serializable
The
PingEvent object describes an AgentX ping result.- Version:
- 3.1.0
- Author:
- Frank Fock
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionPingEvent(Object source, AgentXSession<A> pingedSession, Exception error) Creates a newPingEventfrom a session and a ping response.PingEvent(Object source, AgentXSession<A> pingedSession, AgentXResponsePDU pingResponse) Creates a newPingEventfrom a session and a ping response. -
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets the exception that caused on error.Gets the ping response.Gets theAgentXSession.booleanChecks if the session is closing.booleanChecks if the session is resetting.voidsetCloseSession(boolean closeSession) Request closing of the session.voidsetResetSession(boolean resetSession) Request resetting of the session.toString()Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
PingEvent
Creates a newPingEventfrom a session and a ping response.- Parameters:
source- the event source.pingedSession- the pingedAgentXSession.pingResponse- the ping response.
-
PingEvent
Creates a newPingEventfrom a session and a ping response.- Parameters:
source- the event source.pingedSession- the pingedAgentXSession.error- an exception.
-
-
Method Details
-
getResponse
Gets the ping response.- Returns:
- a
AgentXResponsePDU.
-
getSession
Gets theAgentXSession.- Returns:
- a
AgentXSession.
-
isCloseSession
public boolean isCloseSession()Checks if the session is closing.- Returns:
trueif the session is closed or closing (seesetCloseSession(boolean).
-
isResetSession
public boolean isResetSession()Checks if the session is resetting.- Returns:
trueif the session is resetting or resetted (seesetResetSession(boolean).
-
getError
Gets the exception that caused on error.- Returns:
- an exception.
-
setCloseSession
public void setCloseSession(boolean closeSession) Request closing of the session.- Parameters:
closeSession-trueto request closing the session.
-
setResetSession
public void setResetSession(boolean resetSession) Request resetting of the session.- Parameters:
resetSession-trueto request a reset of the session.
-
toString
- Overrides:
toStringin classEventObject
-