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 newPingEvent
from a session and a ping response.PingEvent
(Object source, AgentXSession<A> pingedSession, AgentXResponsePDU pingResponse) Creates a newPingEvent
from a session and a ping response. -
Method Summary
Modifier and TypeMethodDescriptiongetError()
Gets the exception that caused on error.Gets the ping response.Gets theAgentXSession
.boolean
Checks if the session is closing.boolean
Checks if the session is resetting.void
setCloseSession
(boolean closeSession) Request closing of the session.void
setResetSession
(boolean resetSession) Request resetting of the session.toString()
Methods inherited from class java.util.EventObject
getSource
-
Constructor Details
-
PingEvent
Creates a newPingEvent
from a session and a ping response.- Parameters:
source
- the event source.pingedSession
- the pingedAgentXSession
.pingResponse
- the ping response.
-
PingEvent
Creates a newPingEvent
from 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:
true
if the session is closed or closing (seesetCloseSession(boolean)
.
-
isResetSession
public boolean isResetSession()Checks if the session is resetting.- Returns:
true
if 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
-true
to request closing the session.
-
setResetSession
public void setResetSession(boolean resetSession) Request resetting of the session.- Parameters:
resetSession
-true
to request a reset of the session.
-
toString
- Overrides:
toString
in classEventObject
-