Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unpublished - rights reserved under the Copyright Laws of the United States. Copyright � 2003 Sun Microsystems, Inc. All rights reserved. Copyright � 2005 BEA Systems, Inc. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module Name : JSIP Specification File Name : TimeStampHeader.java Author : Phelim O'Doherty HISTORY Version Date Author Comments 1.1 08/10/2002 Phelim O'Doherty ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 package javax.sip.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

Author(s):
BEA Systems, NIST
Version:
1.2
 
 
 
 
 public interface TimeStampHeader extends Header {

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

Deprecated:
This method is replaced with setTimeStamp(float).
Parameters:
timeStamp - the new float timestamp value
Throws:
javax.sip.InvalidArgumentException if the timestamp value argument is a negative value.
 
     public void setTimeStamp(float timeStampthrows InvalidArgumentException;
    
    
Gets the timestamp value of this TimeStampHeader.

Deprecated:
This method is replaced with getTime().
Returns:
the timestamp value of this TimeStampHeader
 
     public float getTimeStamp();
    
    
Gets the timestamp value of this TimeStampHeader.

Returns:
the timestamp value of this TimeStampHeader
Since:
v1.2
 
     public long getTime();

    
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:
javax.sip.InvalidArgumentException if the timestamp value argument is a negative value.
Since:
v1.2
 
     public void setTime(long timeStampthrows InvalidArgumentException;    
    
    
    
    
Gets delay of TimeStampHeader. This method returns -1 if the delay parameter is not set.

Deprecated:
This method is replaced with getTimeDelay().
Returns:
the delay value of this TimeStampHeader
 
    public float getDelay();    

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

Deprecated:
This method is replaced with setTimeDelay(int).
Parameters:
delay - the new float delay value
Throws:
javax.sip.InvalidArgumentException if the delay value argumenmt is a negative value other than the default value -1.
    public void setDelay(float delaythrows InvalidArgumentException;

    
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
    public int getTimeDelay();    
    
    
Sets the new delay value of the TimestampHeader to the delay parameter passed to this method

Parameters:
delay - the new int delay value
Throws:
javax.sip.InvalidArgumentException if the delay value argumenmt is a negative value other than the default value -1.
Since:
v1.2
    public void setTimeDelay(int delaythrows InvalidArgumentException;
    
   
    
Name of TimeStampHeader
    public final static String NAME = "Timestamp";
New to GrepCode? Check out our FAQ X