dk.i1.diameter
Class AVP_Time

Object
  extended by dk.i1.diameter.AVP
      extended by dk.i1.diameter.AVP_Unsigned32
          extended by dk.i1.diameter.AVP_Time

public class AVP_Time
extends AVP_Unsigned32

A timestamp AVP. AVP_Time contains a second count since 1900. You can get the raw second count using AVP_Unsigned32.queryValue() but this class' methods queryDate() and querySecondsSince1970() are probably more useful in your program.

Diameter does not have any base AVPs (RFC3588) with finer granularity than seconds.


Field Summary
 
Fields inherited from class dk.i1.diameter.AVP
code, vendor_id
 
Constructor Summary
AVP_Time(AVP a)
           
AVP_Time(int code, java.util.Date value)
           
AVP_Time(int code, int seconds_since_1970)
           
AVP_Time(int code, int vendor_id, java.util.Date value)
           
AVP_Time(int code, int vendor_id, int seconds_since_1970)
           
 
Method Summary
 java.util.Date queryDate()
           
 int querySecondsSince1970()
           
 void setValue(java.util.Date value)
           
 
Methods inherited from class dk.i1.diameter.AVP_Unsigned32
queryValue, setValue
 
Methods inherited from class dk.i1.diameter.AVP
isMandatory, isPrivate, isVendorSpecific, queryPayload, setM, setMandatory, setPrivate
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AVP_Time

public AVP_Time(AVP a)
         throws InvalidAVPLengthException
Throws:
InvalidAVPLengthException

AVP_Time

public AVP_Time(int code,
                java.util.Date value)

AVP_Time

public AVP_Time(int code,
                int vendor_id,
                java.util.Date value)

AVP_Time

public AVP_Time(int code,
                int seconds_since_1970)

AVP_Time

public AVP_Time(int code,
                int vendor_id,
                int seconds_since_1970)
Method Detail

queryDate

public java.util.Date queryDate()

querySecondsSince1970

public int querySecondsSince1970()

setValue

public void setValue(java.util.Date value)