Class MasterContextInfo

java.lang.Object
org.snmp4j.agent.agentx.master.MasterContextInfo
All Implemented Interfaces:
Serializable, Comparable<MasterContextInfo>

public class MasterContextInfo extends Object implements Serializable, Comparable<MasterContextInfo>
An AgentX master agent needs to manage certain context related information which this class holds. The most important of this information is the context's uptime (derived from the sysUpTime object of the context - if present).
Version:
3.0
Author:
Frank Fock
See Also:
  • Constructor Details

    • MasterContextInfo

      public MasterContextInfo(org.snmp4j.smi.OctetString context, org.snmp4j.agent.mo.snmp.SysUpTime contextUpTime)
      Creates a new MasterContextInfo for a context and its uptime.
      Parameters:
      context - the context this information is associated with.
      contextUpTime - the uptime of the context (derived from its sysUpTime object).
  • Method Details

    • compareTo

      public int compareTo(MasterContextInfo o)
      Specified by:
      compareTo in interface Comparable<MasterContextInfo>
    • getContext

      public org.snmp4j.smi.OctetString getContext()
      Gets the context this information is associated with.
      Returns:
      the context OctetString.
    • getUpTime

      public org.snmp4j.agent.mo.snmp.SysUpTime getUpTime()
      Gets the uptime of the context.
      Returns:
      the context's SysUpTime.