JAIN-SIP 2.0 API

javax.sip.header
Interface TimeStampHeader

All Superinterfaces:
Cloneable, Header, Serializable

public interface TimeStampHeader
extends Header

The Timestamp header field describes when the UAC sent the request to the UAS. When a 100 (Trying) response is generated, any Timestamp header field present in the request MUST be copied into this 100 (Trying) response. If there is a delay in generating the response, the UAS SHOULD add a delay value into the Timestamp value in the response. This value MUST contain the difference between the time of sending of the response and receipt of the request, measured in seconds. Although there is no normative behavior defined here that makes use of the header, it allows for extensions or SIP applications to obtain RTT estimates, that may be used to adjust the timeout value for retransmissions.

For Example:
Timestamp: 54

Since:
1.1
Version:
2.0
Author:
Oracle Inc., NIST

Field Summary
static String NAME
          Name of TimeStampHeader
 
Method Summary
 float getDelay()
          Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with getTimeDelay().
 long getTime()
          Gets the timestamp value of this TimeStampHeader.
 int getTimeDelay()
          Gets delay of TimeStampHeader.
 float getTimeStamp()
          Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with getTime().
 void setDelay(float delay)
          Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with setTimeDelay(int).
 void setTime(long timeStamp)
          Sets the timestamp value of this TimeStampHeader to the new timestamp value passed to this method.
 void setTimeDelay(int delay)
          Sets the new delay value of the TimestampHeader to the delay parameter passed to this method
 void setTimeStamp(float timeStamp)
          Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with setTimeStamp(float).
 
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, getValue, hashCode, toString
 

Field Detail

NAME

static final String NAME
Name of TimeStampHeader

See Also:
Constant Field Values
Method Detail

setTimeStamp

void setTimeStamp(float timeStamp)
                  throws InvalidArgumentException
Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with setTimeStamp(float).

Sets the timestamp value of this TimeStampHeader to the new timestamp value passed to this method.

Parameters:
timeStamp - - the new float timestamp value
Throws:
InvalidArgumentException - if the timestamp value argument is a negative value.

getTimeStamp

float getTimeStamp()
Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with getTime().

Gets the timestamp value of this TimeStampHeader.

Returns:
the timestamp value of this TimeStampHeader

getTime

long getTime()
Gets the timestamp value of this TimeStampHeader.

Returns:
the timestamp value of this TimeStampHeader
Since:
v1.2

setTime

void setTime(long timeStamp)
             throws InvalidArgumentException
Sets the timestamp value of this TimeStampHeader to the new timestamp value passed to this method. This method allows applications to conveniantly use System.currentTimeMillis to set the timeStamp value.

Parameters:
timeStamp - - the new long timestamp value
Throws:
InvalidArgumentException - if the timestamp value argument is a negative value.
Since:
v1.2

getDelay

float getDelay()
Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with getTimeDelay().

Gets delay of TimeStampHeader. This method returns -1 if the delay parameter is not set.

Returns:
the delay value of this TimeStampHeader

setDelay

void setDelay(float delay)
              throws InvalidArgumentException
Deprecated. WARNING: Implementations may throw OperationNotSupportedException. This method is replaced with setTimeDelay(int).

Sets the new delay value of the TimestampHeader to the delay parameter passed to this method

Parameters:
delay - - the new float delay value
Throws:
InvalidArgumentException - if the delay value argumenmt is a negative value other than the default value -1.

getTimeDelay

int getTimeDelay()
Gets delay of TimeStampHeader. This method returns -1 if the delay parameter is not set.

Returns:
the delay value of this TimeStampHeader as an integer.
Since:
v1.2

setTimeDelay

void setTimeDelay(int delay)
                  throws InvalidArgumentException
Sets the new delay value of the TimestampHeader to the delay parameter passed to this method

Parameters:
delay - - the new int delay value
Throws:
InvalidArgumentException - if the delay value argumenmt is a negative value other than the default value -1.
Since:
v1.2

JAIN-SIP 2.0 API


See conditions of use.
Submit a bug report or feature request.