javax.sdp
Interface TimeZoneAdjustment

All Superinterfaces:
Cloneable, Field, Serializable
All Known Implementing Classes:
ZoneField

public interface TimeZoneAdjustment
extends Field

A TimeZoneAdjustment represents the z= fields contained within a TimeDescription. A TimeZoneAdjustment specifies timezone changes which take place during or in between sessions announced in a session description. From RFC 2327: To schedule a repeated session which spans a change from daylight- saving time to standard time or vice-versa, it is necessary to specify offsets from the base repeat times. This is required because different time zones change time at different times of day, different countries change to or from daylight time on different dates, and some countries do not have daylight saving time at all. Thus in order to schedule a session that is at the same time winter and summer, it must be possible to specify unambiguously by whose time zone a session is scheduled. To simplify this task for receivers, we allow the sender to specify the NTP time that a time zone adjustment happens and the offset from the time when the session was first scheduled. The "z" field allows the sender to specify a list of these adjustment times and offsets from the base time. Please refer to IETF RFC 2327 for a description of SDP.

Version:
1.0
Author:
deruelle

Method Summary
 boolean getTypedTime()
          Returns whether the field will be output as a typed time or a integer value.
 Hashtable getZoneAdjustments(boolean create)
          Returns a Hashtable of adjustment times, where: key = Date.
 void setTypedTime(boolean typedTime)
          Sets whether the field will be output as a typed time or a integer value.
 void setZoneAdjustments(Hashtable map)
          Sets the Hashtable of adjustment times, where: key = Date.
 
Methods inherited from interface javax.sdp.Field
clone, getTypeChar
 

Method Detail

getZoneAdjustments

Hashtable getZoneAdjustments(boolean create)
                             throws SdpParseException
Returns a Hashtable of adjustment times, where: key = Date. This is the equivalent of the decimal NTP time value. value = Int Adjustment. This is a relative time value in seconds.

Parameters:
create - to set
Returns:
create - when true, an empty Hashtable is created, if it is null.
Throws:
SdpParseException

setZoneAdjustments

void setZoneAdjustments(Hashtable map)
                        throws SdpException
Sets the Hashtable of adjustment times, where: key = Date. This is the equivalent of the decimal NTP time value. value = Int Adjustment. This is a relative time value in seconds.

Parameters:
map - Hashtable to set
Throws:
SdpException - if the parameter is null

setTypedTime

void setTypedTime(boolean typedTime)
Sets whether the field will be output as a typed time or a integer value. Typed time is formatted as an integer followed by a unit character. The unit indicates an appropriate multiplier for the integer. The following unit types are allowed. d - days (86400 seconds) h - hours (3600 seconds) m - minutes (60 seconds) s - seconds ( 1 seconds)

Parameters:
typedTime - typedTime - if set true, the start and stop times will be output in an optimal typed time format; if false, the times will be output as integers.

getTypedTime

boolean getTypedTime()
Returns whether the field will be output as a typed time or a integer value. Typed time is formatted as an integer followed by a unit character. The unit indicates an appropriate multiplier for the integer. The following unit types are allowed. d - days (86400 seconds) h - hours (3600 seconds) m - minutes (60 seconds) s - seconds ( 1 seconds)

Returns:
true, if the field will be output as a typed time; false, if as an integer value.


Copyright © 2012. All Rights Reserved.