org.snmp4j.agent.agentx.master
Class AbstractAgentXPending

java.lang.Object
  extended by org.snmp4j.agent.agentx.master.AbstractAgentXPending
All Implemented Interfaces:
AgentXPending
Direct Known Subclasses:
AgentXPendingClose, AgentXPendingGet, AgentXPendingSet

public abstract class AbstractAgentXPending
extends java.lang.Object
implements AgentXPending


Field Summary
protected  AgentXRegEntry registration
           
 
Constructor Summary
AbstractAgentXPending(AgentXRegEntry registration, org.snmp4j.agent.request.SnmpRequest request)
           
 
Method Summary
 AgentXRegEntry getRegistration()
           
 org.snmp4j.agent.request.SnmpRequest getRequest()
           
 int getTimeout()
          Gets the timeout seconds set for this pending AgentX request.
 long getTimestamp()
          Gets the timestamp (in milliseconds) when AgentXPending.updateTimestamp() had been called last.
 boolean isPending()
           
 void setPending(boolean pending)
           
 void setTimeout(int timeoutSeconds)
           
 java.lang.String toString()
           
protected  java.lang.String toStringMembers()
           
 void updateTimestamp()
          Set the timestamp to the current time (in milliseconds).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.snmp4j.agent.agentx.master.AgentXPending
getAgentXPDU, getReferences, getSession
 

Field Detail

registration

protected AgentXRegEntry registration
Constructor Detail

AbstractAgentXPending

public AbstractAgentXPending(AgentXRegEntry registration,
                             org.snmp4j.agent.request.SnmpRequest request)
Method Detail

updateTimestamp

public void updateTimestamp()
Description copied from interface: AgentXPending
Set the timestamp to the current time (in milliseconds).

Specified by:
updateTimestamp in interface AgentXPending

getTimestamp

public long getTimestamp()
Description copied from interface: AgentXPending
Gets the timestamp (in milliseconds) when AgentXPending.updateTimestamp() had been called last.

Specified by:
getTimestamp in interface AgentXPending
Returns:
System.currentTimeMillis() when AgentXPending.updateTimestamp() had been called or zero if it had not been called yet.

setTimeout

public void setTimeout(int timeoutSeconds)
Specified by:
setTimeout in interface AgentXPending

setPending

public void setPending(boolean pending)
Specified by:
setPending in interface AgentXPending

getTimeout

public int getTimeout()
Description copied from interface: AgentXPending
Gets the timeout seconds set for this pending AgentX request.

Specified by:
getTimeout in interface AgentXPending
Returns:
the timeout value in seconds.

getRegistration

public AgentXRegEntry getRegistration()
Specified by:
getRegistration in interface AgentXPending

isPending

public boolean isPending()
Specified by:
isPending in interface AgentXPending

getRequest

public org.snmp4j.agent.request.SnmpRequest getRequest()
Specified by:
getRequest in interface AgentXPending

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toStringMembers

protected final java.lang.String toStringMembers()

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.