Package org.snmp4j.agent.agentx.master
Interface AgentXPending<A extends org.snmp4j.smi.Address>
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractAgentXPending
,AgentXPendingClose
,AgentXPendingGet
,AgentXPendingSet
The
AgentXPending
interface is implemented
by classes holding sub-agent AgentX request state information in a SNMP4J-AgentX master agent.- Version:
- 4.1.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionGets the AgentX PDU.org.snmp4j.agent.request.SubRequestIterator
<org.snmp4j.agent.request.SnmpRequest.SnmpSubRequest> Get the references to the SNMP sub-requests that triggered the AgentX request.Get the affectedAgentXRegEntry
.org.snmp4j.agent.request.SnmpRequest
Gets the SNMP request that triggered the AgentX request.Gets the master agent session.int
Gets the timeout seconds set for this pending AgentX request.long
Gets the timestamp (in milliseconds) whenupdateTimestamp()
had been called last.boolean
Checks if the request is still pending.void
setPending
(boolean pending) Sets the pending flag.void
setTimeout
(int timeoutSeconds) Sets the timeout of the request.void
Set the timestamp to the current time (in milliseconds).
-
Method Details
-
getAgentXPDU
AgentXPDU getAgentXPDU()Gets the AgentX PDU.- Returns:
- the
AgentXPDU
.
-
getRegistration
AgentXRegEntry<A> getRegistration()Get the affectedAgentXRegEntry
.- Returns:
- the affected registration.
-
getSession
AgentXMasterSession<A> getSession()Gets the master agent session.- Returns:
- the
AgentXMasterSession
.
-
isPending
boolean isPending()Checks if the request is still pending.- Returns:
true
if the request is still pending.
-
setPending
void setPending(boolean pending) Sets the pending flag.- Parameters:
pending
-false
if the response for the request has been received or the request timed out.
-
getRequest
org.snmp4j.agent.request.SnmpRequest getRequest()Gets the SNMP request that triggered the AgentX request.- Returns:
- a
SnmpRequest
.
-
getReferences
org.snmp4j.agent.request.SubRequestIterator<org.snmp4j.agent.request.SnmpRequest.SnmpSubRequest> getReferences()Get the references to the SNMP sub-requests that triggered the AgentX request.- Returns:
- an iterator on the SNMP requests associated with this AgentX pending request.
-
updateTimestamp
void updateTimestamp()Set the timestamp to the current time (in milliseconds). -
getTimestamp
long getTimestamp()Gets the timestamp (in milliseconds) whenupdateTimestamp()
had been called last.- Returns:
System.currentTimeMillis()
whenupdateTimestamp()
had been called or zero if it had not been called yet.
-
setTimeout
void setTimeout(int timeoutSeconds) Sets the timeout of the request.- Parameters:
timeoutSeconds
- a timeout value in seconds.
-
getTimeout
int getTimeout()Gets the timeout seconds set for this pending AgentX request.- Returns:
- the timeout value in seconds.
-