com.sun.management.snmp
Class Timestamp

java.lang.Object
  extended by com.sun.management.snmp.Timestamp
All Implemented Interfaces:
Serializable

public class Timestamp
extends Object
implements Serializable

This class is used by the SnmpVarBindList object. An SnmpVarBindList time stamp object represents the time stamp when the list was updated with the response variables.

Since:
Java DMK 5.1
See Also:
Serialized Form

Constructor Summary
Timestamp()
          The default constructor.
Timestamp(long uptime)
          Creates a TimeStamp object using the user parameters.
Timestamp(long uptime, long when)
          Creates a TimeStamp object using the user parameters.
 
Method Summary
 Date getDate()
          Gets the current date.
 long getDateTime()
          Gets the current date.
 long getSysUpTime()
          Gets the time (in hundredths of a second) since the network management portion of the system was last re-initialized.
 SnmpTimeticks getTimeTicks()
          Gets the SnmpTimeticks object corresponding to the TimeStamp object.
 String toString()
          Returns a String representation of the TimeStamp object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()
The default constructor. Sysuptime is 0. This simply indicates when this object was created.


Timestamp

public Timestamp(long uptime,
                 long when)
Creates a TimeStamp object using the user parameters.

Parameters:
uptime - The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
when - The current time.

Timestamp

public Timestamp(long uptime)
Creates a TimeStamp object using the user parameters.

Parameters:
uptime - The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
Method Detail

getTimeTicks

public final SnmpTimeticks getTimeTicks()
Gets the SnmpTimeticks object corresponding to the TimeStamp object.

Returns:
The SnmpTimeticks object.

getSysUpTime

public final long getSysUpTime()
Gets the time (in hundredths of a second) since the network management portion of the system was last re-initialized.

Returns:
The sysUpTime.

getDate

public final Date getDate()
Gets the current date.

Returns:
A Date object representing the current date.

getDateTime

public final long getDateTime()
Gets the current date.

Returns:
A long representing the current date.

toString

public final String toString()
Returns a String representation of the TimeStamp object.

Overrides:
toString in class Object
Returns:
A String representation of the TimeStamp object.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.