|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nist.javax.sip.header.SIPDate
public class SIPDate
Implements a parser class for tracking expiration time when specified as a Date value.
From the HTTP 1.1 spec 14.18 Date The Date general-header field represents the date and time at which the message was originated, having the same semantics as orig-date in RFC 822. The field value is an HTTP-date, as described in section 3.3.1; it MUST be sent in RFC 1123 [8]-date format. Date = "Date" ":" HTTP-date An example is Date: Tue, 15 Nov 1994 08:12:31 GMT
Field Summary | |
---|---|
static String |
APR
|
static String |
AUG
|
static String |
DEC
|
static String |
FEB
|
static String |
FRI
|
static String |
GMT
|
static String |
JAN
|
static String |
JUL
|
static String |
JUN
|
static String |
MAR
|
static String |
MAY
|
static String |
MON
|
static String |
NOV
|
static String |
OCT
|
static String |
SAT
|
static String |
SEP
|
static String |
SUN
|
static String |
THU
|
static String |
TUE
|
static String |
WED
|
Constructor Summary | |
---|---|
SIPDate()
Initializer, sets all the fields to invalid values. |
|
SIPDate(long timeMillis)
Construct a SIP date from the time offset given in miliseconds |
Method Summary | |
---|---|
Object |
clone()
|
String |
encode()
Get canonical string representation. |
boolean |
equals(Object that)
equality check. |
int |
getDeltaSeconds()
Get the time offset from the current time. |
int |
getHour()
get the hour |
Calendar |
getJavaCal()
The only accessor we allow is to the java calendar record. |
int |
getMinute()
get the minute |
String |
getMonth()
get the month |
int |
getSecond()
get the second |
String |
getWkday()
get the WkDay field |
int |
getYear()
Get the year member. |
void |
setDay(int d)
Set the day member |
void |
setHour(int h)
Set the hour member |
void |
setMinute(int m)
Set the minute member |
void |
setMonth(String m)
Set the month member |
void |
setSecond(int s)
Set the second member |
void |
setWkday(String w)
Set the wkday member |
void |
setYear(int y)
Set the year member |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GMT
public static final String MON
public static final String TUE
public static final String WED
public static final String THU
public static final String FRI
public static final String SAT
public static final String SUN
public static final String JAN
public static final String FEB
public static final String MAR
public static final String APR
public static final String MAY
public static final String JUN
public static final String JUL
public static final String AUG
public static final String SEP
public static final String OCT
public static final String NOV
public static final String DEC
Constructor Detail |
---|
public SIPDate()
public SIPDate(long timeMillis)
timeMillis
- long to setMethod Detail |
---|
public boolean equals(Object that)
equals
in class Object
public String encode()
public Calendar getJavaCal()
public String getWkday()
public String getMonth()
public int getHour()
public int getMinute()
public int getSecond()
public void setWkday(String w) throws IllegalArgumentException
w
- String to set
IllegalArgumentException
- if w is not a valid day.public void setDay(int d) throws IllegalArgumentException
d
- int to set
IllegalArgumentException
- if d is not a valid daypublic void setMonth(String m) throws IllegalArgumentException
m
- String to set.
IllegalArgumentException
- if m is not a valid monthpublic void setYear(int y) throws IllegalArgumentException
y
- int to set
IllegalArgumentException
- if y is not a valid year.public int getYear()
public void setHour(int h) throws IllegalArgumentException
h
- int to set
IllegalArgumentException
- if h is not a valid hour.public void setMinute(int m) throws IllegalArgumentException
m
- int to set
IllegalArgumentException
- if m is not a valid minutepublic void setSecond(int s) throws IllegalArgumentException
s
- int to set
IllegalArgumentException
- if s is not a valid secondpublic int getDeltaSeconds()
public Object clone()
clone
in class Object
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |