javax.sdp
Interface TimeDescription

All Superinterfaces:
Cloneable, Serializable
All Known Implementing Classes:
TimeDescriptionImpl

public interface TimeDescription
extends Serializable, Cloneable

A TimeDescription represents the fields present within a SDP time description. Quoting from RFC 2327: Multiple "t=" fields may be used if a session is active at multiple irregularly spaced times; each additional "t=" field specifies an additional period of time for which the session will be active. If the session is active at regular times, an "r=" field (see below) should be used in addition to and following a "t=" field - in which case the "t=" field specifies the start and stop times of the repeat sequence. Please refer to IETF RFC 2327 for a description of SDP.

Version:
1.0
Author:
deruelle

Field Summary
static long NTP_CONST
          Constant used to translate between NTP time used in SDP and "native" Java time.
 
Method Summary
 Vector getRepeatTimes(boolean create)
          Returns the list of repeat times (r= fields) specified in the SessionDescription.
 Time getTime()
          Returns the Time field.
 void setRepeatTimes(Vector repeatTimes)
          Returns the list of repeat times (r= fields) specified in the SessionDescription.
 void setTime(Time t)
          Sets the Time field.
 

Field Detail

NTP_CONST

static final long NTP_CONST
Constant used to translate between NTP time used in SDP and "native" Java time. NTP time is defined as the number of seconds relative to midnight, January 1, 1900 and Java time is measured in number of milliseconds since midnight, January 1, 1970 UTC (see System#currentTimeMillis()}). The value of this constant is 2208988800L. It can be used to convert between NTP and Java time using the following formulas: ntpTime = javaTime/1000 * SdpConstants.NTP_CONST; javaTime = (ntpTime - SdpConstants.NTP_CONST) * 1000; The Network Time Protocol (NTP) is defined in RFC 1305.

See Also:
Constant Field Values
Method Detail

getTime

Time getTime()
             throws SdpParseException
Returns the Time field.

Returns:
Time
Throws:
SdpParseException

setTime

void setTime(Time t)
             throws SdpException
Sets the Time field.

Parameters:
t - Time to set
Throws:
SdpException - if the time is null

getRepeatTimes

Vector getRepeatTimes(boolean create)
Returns the list of repeat times (r= fields) specified in the SessionDescription.

Parameters:
create - boolean to set
Returns:
Vector

setRepeatTimes

void setRepeatTimes(Vector repeatTimes)
                    throws SdpException
Returns the list of repeat times (r= fields) specified in the SessionDescription.

Parameters:
repeatTimes - Vector to set
Throws:
SdpException - if the parameter is null


Copyright © 2012. All Rights Reserved.