|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jain.protocol.ip.sip.header.Header
|
+--jain.protocol.ip.sip.header.GeneralHeader
|
+--jain.protocol.ip.sip.header.ExpiresHeader
This class represents the Expires entity-header. The ExpiresHeader gives the date and time after which the message content expires.
The ExpiresHeader is currently defined only for RegisterMessages and InviteMessages and their corresponding ResponseMessages. In a RegisterMessage, the client indicates how long it wishes the registration to be valid. In the ResponseMessage, the server indicates the earliest expiration time of all registrations. The server may choose a shorter time interval than that requested by the client, but should not choose a longer one.
For InviteMessages the caller can limit the validity of an invitation, for example, if a client wants to limit the time duration of a search or a conference invitation. A user interface may take this as a hint to leave the invitation window on the screen even if the user is not currently at the workstation. This also limits the duration of a search. If the InviteMessage expires before the search completes, the proxy returns a REQUEST_TIMEOUT ResponseMessage. In a MOVED_TEMPORARILY ResponseMessage, a server can advise the client of the maximal duration of the redirection.
The value of this field can be either a date or an integer number of seconds (in decimal), measured from the receipt of the RequestMessage. The latter approach is preferable for short durations, as it does not depend on clients and servers sharing a synchronized clock. Implementations may treat values larger than 2**32-1 (4294967295 or 136 years) as equivalent to 2**32-1.
| Field Summary | |
static java.lang.String |
token
Token of ExpiresHeader |
| Fields inherited from class jain.protocol.ip.sip.header.Header |
ENTITY_HEADER,
GENERAL_HEADER,
REQUEST_HEADER,
RESPONSE_HEADER |
| Constructor Summary | |
ExpiresHeader(java.util.Date date)
Creates an ExpiresHeader based on given date |
|
ExpiresHeader(long deltaSeconds)
Creates an ExpiresHeader based on given number of delta-seconds |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of ExpiresHeader |
boolean |
equals(ExpiresHeader expiresHeader)
Indicates whether some other ExpiresHeader is "equal to" this one |
java.util.Date |
getDate()
Gets date of ExpiresHeader |
long |
getDeltaSeconds()
Gets delta-seconds of ExpiresHeader |
java.lang.String |
getValue()
Gets value of ExpiresHeader |
boolean |
hasDate()
Returns boolean value to indicate if ExpiryHeader has its expiry value in date format |
void |
setDate(java.util.Date date)
Sets date of ExpiresHeader |
void |
setDeltaSeconds(long deltaSeconds)
Sets delta-seconds of Header |
| Methods inherited from class jain.protocol.ip.sip.header.Header |
equals,
getHeaderType,
getToken,
setValue,
toString |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String token
| Constructor Detail |
public ExpiresHeader(long deltaSeconds)
throws java.lang.IllegalArgumentException
deltaSeconds - delta-seconds
public ExpiresHeader(java.util.Date date)
throws java.lang.IllegalArgumentException
date - date| Method Detail |
public boolean hasDate()
public java.util.Date getDate()
throws ParameterNotSetException
public long getDeltaSeconds()
throws ParameterNotSetException
public void setDate(java.util.Date date)
throws java.lang.IllegalArgumentException
date - datepublic void setDeltaSeconds(long deltaSeconds)
deltaSeconds - delta-secondspublic java.lang.String getValue()
public java.lang.Object clone()
public boolean equals(ExpiresHeader expiresHeader)
expiresHeader - the ExpiresHeader with which to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems