javax.time.calendar.zone
Interface ZoneRulesDataProvider


public interface ZoneRulesDataProvider

Provides access to a versioned set of time-zone rules from a single group.

Multiple providers of time-zone rules may be registered. Each provider will supply one to many zone IDs. No two providers may overlap in the set of zone IDs that they provide.

The values returned by the provider must never change over time. A new provider must be returned to return new regions or versions.

Many systems would like to receive new time-zone rules dynamically. This must be implemented separately from this interface, typically using a listener. Whenever the listener detects new rules it should call ZoneRulesGroup.registerProvider(ZoneRulesDataProvider) using a standard immutable provider implementation.

This interface is a service provider that can be called by multiple threads. Implementations must be immutable and thread-safe.

Author:
Stephen Colebourne

Method Summary
 java.lang.String getGroupID()
          Gets the time-zone group ID of the data available via this provider, such as 'TZDB'.
 java.util.Set<java.lang.String> getRegionIDs()
          Gets the provided region IDs.
 java.util.Set<ZoneRulesVersion> getVersions()
          Gets the provided rules, version by version.
 

Method Detail

getGroupID

java.lang.String getGroupID()
Gets the time-zone group ID of the data available via this provider, such as 'TZDB'.

Group IDs must match regex [A-Za-z0-9._-]+. Group IDs should use reverse domain name notation, like packages. Group IDs without a dot are reserved.

Returns:
the ID of the group, not null

getVersions

java.util.Set<ZoneRulesVersion> getVersions()
Gets the provided rules, version by version.

Returns:
the provided rules, not to be modified, not null

getRegionIDs

java.util.Set<java.lang.String> getRegionIDs()
Gets the provided region IDs.

Returns:
the provided region IDs, not to be modified, not null