JSIP API v1.2
November 2006

javax.sip.header
Interface ExpiresHeader

All Superinterfaces:
java.lang.Cloneable, Header, java.io.Serializable
All Known Subinterfaces:
MinExpiresHeader

public interface ExpiresHeader
extends Header

The Expires header field gives the relative time after which the message (or content) expires. The precise meaning of this is method dependent. The expiration time in an INVITE does not affect the duration of the actual session that may result from the invitation. Session description protocols may offer the ability to express time limits on the session duration, however. The value of this field is an integral number of seconds (in decimal) between 0 and (2**32)-1, measured from the receipt of the request. Malformed values SHOULD be treated as equivalent to 3600.

This interface represents the Expires entity-header. The ExpiresHeader is optional in both REGISTER and INVITE Requests.

Example:
Expires: 5

Author:
BEA Systems, NIST

Field Summary
static java.lang.String NAME
          Name of ExpiresHeader
 
Method Summary
 int getExpires()
          Gets the expires value of the ExpiresHeader.
 void setExpires(int expires)
          Sets the relative expires value of the ExpiresHeader in units of seconds.
 
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, hashCode, toString
 

Field Detail

NAME

static final java.lang.String NAME
Name of ExpiresHeader

See Also:
Constant Field Values
Method Detail

setExpires

void setExpires(int expires)
                throws InvalidArgumentException
Sets the relative expires value of the ExpiresHeader in units of seconds. The expires value MUST be between zero and (2**31)-1.

Parameters:
expires - - the new expires value of this ExpiresHeader
Throws:
InvalidArgumentException - if supplied value is less than zero.

getExpires

int getExpires()
Gets the expires value of the ExpiresHeader. This expires value is relative time.

Returns:
the expires value of the ExpiresHeader.

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems