Package org.snmp4j.agent.agentx
Interface AgentXCommandListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
AgentX
,AgentXCommandProcessor
,AgentXSubagent
The
AgentXCommandListener
interface is implemented by AgentX master or sub-agents to process AgentX
messages.- Version:
- 3.0.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionMap
<AgentXSession<?>, Integer> closeAllSessions
(byte reason) Close all sessions associated with thisAgentXCommandListener
and return the AgentX status of the close operation together with theAgentXSession
object.<A extends org.snmp4j.smi.Address>
voidprocessCommand
(AgentXCommandEvent<A> event) Process an AgentX message.
-
Method Details
-
processCommand
Process an AgentX message.- Type Parameters:
A
-Address
type of peer that trigger this command.- Parameters:
event
- the AgentX message and necessary context information.
-
closeAllSessions
Close all sessions associated with thisAgentXCommandListener
and return the AgentX status of the close operation together with theAgentXSession
object.- Parameters:
reason
- the AgentX reason (AgentXProtocol.REASON_SHUTDOWN
,AgentXProtocol.REASON_TIMEOUTS
,AgentXProtocol.REASON_BY_MANAGER
,AgentXProtocol.REASON_PROTOCOL_ERROR
,AgentXProtocol.REASON_PARSE_ERROR
,AgentXProtocol.REASON_OTHER
) for closing the session.- Returns:
- a map of the AgentXSession session objects hold by this agent and the corresponding AgentX error code. An
error code of
AgentXProtocol.AGENTX_SUCCESS
indicates that this session was successfully closed. - Since:
- 3.0.0
-