- java.lang.Object
-
- org.snmp4j.security.UsmTimeEntry
-
- All Implemented Interfaces:
java.io.Serializable
public class UsmTimeEntry extends java.lang.Object implements java.io.Serializable
TheUsmTimeEntry
class represents time synchronization information associated with an engine ID.- Version:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
engineBoots
private OctetString
engineID
private int
latestReceivedTime
private static long
serialVersionUID
private int
timeDiff
-
Constructor Summary
Constructors Constructor Description UsmTimeEntry(OctetString engineID, int engineBoots, int engineTime)
Creates a time entry with engine ID, engine boots and time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getEngineBoots()
OctetString
getEngineID()
int
getLatestReceivedTime()
Gets the time when a message has been received last from the associated SNMP engine.int
getTimeDiff()
void
setEngineBoots(int engineBoots)
void
setEngineTime(int engineTime)
Sets the engine time which also sets the last received engine time to the supplied value.void
setLatestReceivedTime(int latestReceivedTime)
Sets the time when a message has been received last from the associated SNMP engine.void
setTimeDiff(int timeDiff)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
engineID
private OctetString engineID
-
engineBoots
private int engineBoots
-
timeDiff
private int timeDiff
-
latestReceivedTime
private int latestReceivedTime
-
-
Constructor Detail
-
UsmTimeEntry
public UsmTimeEntry(OctetString engineID, int engineBoots, int engineTime)
Creates a time entry with engine ID, engine boots and time.- Parameters:
engineID
- the engine ID for which time synchronization information is created.engineBoots
- the number of engine boots of the engine.engineTime
- the time in seconds elapsed since the last reboot of the engine.
-
-
Method Detail
-
getEngineID
public OctetString getEngineID()
-
getEngineBoots
public int getEngineBoots()
-
setEngineBoots
public void setEngineBoots(int engineBoots)
-
getTimeDiff
public int getTimeDiff()
-
setTimeDiff
public void setTimeDiff(int timeDiff)
-
getLatestReceivedTime
public int getLatestReceivedTime()
Gets the time when a message has been received last from the associated SNMP engine.- Returns:
- the engine time in seconds.
-
setLatestReceivedTime
public void setLatestReceivedTime(int latestReceivedTime)
Sets the time when a message has been received last from the associated SNMP engine.- Parameters:
latestReceivedTime
- the engine time in seconds.
-
setEngineTime
public void setEngineTime(int engineTime)
Sets the engine time which also sets the last received engine time to the supplied value.- Parameters:
engineTime
- the time in seconds elapsed since the last reboot of the engine.
-
-