org.dvb.tvanytime.resolution
Class ContentReferencingManager

java.lang.Object
  extended by org.dvb.tvanytime.resolution.ContentReferencingManager

public abstract class ContentReferencingManager
extends java.lang.Object

This class provides access to Content Referencing Information. Asynchronous methods supporting CRID resolution provide resolution results in the form of a ResolutionResponse object which encapsulates Content Locators or Content References with state data. Where the resolution source is not specified explicitly, or more than one resolution source is specified, the sources are searched in the following order until resolution is complete:

1. RESOLVE_LOCAL
2. RESOLVE_DVB_NO_TUNING
3. RESOLVE_DVB_WITH_TUNING
4. RESOLVE_IP

If resolution can be completed using from information held locally in a transparent cache then listeners will be informed immediately.


Field Summary
static short BOUQUET_ID
          Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is a bouquet_id.
static short NETWORK_ID
          Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is a network_id.
static short ORIG_NET_ID
          Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is an original_network_id.
static int RESOLVE_DVB_NO_TUNING
          Constant value for resolutionSources which determines whether DVB streams should be used when resolving but without tuning a reserved tuner.
static int RESOLVE_DVB_WITH_TUNING
          Constant value for resolutionSources which determines whether DVB streams should be used when resolving with tuning.
static int RESOLVE_IP
          Constant value for resolutionSources which determines whether IP servers should be used when resolving.
static int RESOLVE_LOCAL
          Constant value for resolutionSources which determines whether locators for locally recorded content should be returned when resolving.
 
Constructor Summary
ContentReferencingManager()
           
 
Method Summary
static ContentReferencingManager getInstance()
          Get a ContentReferencingManager where the platform chooses the context and resolution provider preferences.
static ContentReferencingManager getInstance(int contextId, int contextIdType)
          Get a ContentReferencingManager for a specified context where the platform chooses the resolution provider preferences.
static ContentReferencingManager getInstance(Locator URL)
          Get a ContentReferencingManager which uses the specified server for IP-based queries.
static ContentReferencingManager getInstance(ResolutionProviderInformation provider)
          Get a ContentReferencingManager for a specified context and resolution provider.
static ResolutionProviderInformation[] getResolutionProviderInformation(int resolutionSources)
          Get a set of ResolutionProviderInformation for the specified resolution sources.
abstract  boolean isComplete(java.lang.String CRIDAuthority)
          Determine whether this ContentReferencingManager provides a complete resolution service for the specified CRID authority.
abstract  void resolveCRID(CRID cr, int resolutionSources, ResolutionListener listener)
          Used to resolve a CRID.
abstract  void resolveCRID(CRID cr, ResolutionListener listener)
          Used to resolve a CRID.
abstract  void resolveCRIDList(CRID[] crList, int resolutionSources, ResolutionListener listener)
          Used to resolve a list of CRIDs.
abstract  void resolveCRIDList(CRID[] crList, ResolutionListener listener)
          Used to resolve a list of CRIDs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOLVE_LOCAL

public static final int RESOLVE_LOCAL
Constant value for resolutionSources which determines whether locators for locally recorded content should be returned when resolving.

See Also:
Constant Field Values

RESOLVE_DVB_NO_TUNING

public static final int RESOLVE_DVB_NO_TUNING
Constant value for resolutionSources which determines whether DVB streams should be used when resolving but without tuning a reserved tuner.

See Also:
Constant Field Values

RESOLVE_DVB_WITH_TUNING

public static final int RESOLVE_DVB_WITH_TUNING
Constant value for resolutionSources which determines whether DVB streams should be used when resolving with tuning.

See Also:
Constant Field Values

RESOLVE_IP

public static final int RESOLVE_IP
Constant value for resolutionSources which determines whether IP servers should be used when resolving.

See Also:
Constant Field Values

BOUQUET_ID

public static final short BOUQUET_ID
Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is a bouquet_id.

See Also:
Constant Field Values

ORIG_NET_ID

public static final short ORIG_NET_ID
Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is an original_network_id.

See Also:
Constant Field Values

NETWORK_ID

public static final short NETWORK_ID
Constant value for contextIdType as defined in ETSI TS 102 323, indicating that the contextId is a network_id.

See Also:
Constant Field Values
Constructor Detail

ContentReferencingManager

public ContentReferencingManager()
Method Detail

getInstance

public static ContentReferencingManager getInstance()
Get a ContentReferencingManager where the platform chooses the context and resolution provider preferences.

Returns:
a ContentReferencingManager

getInstance

public static ContentReferencingManager getInstance(int contextId,
                                                    int contextIdType)
Get a ContentReferencingManager for a specified context where the platform chooses the resolution provider preferences.

Parameters:
contextId - the contextId as specified in the Resolution Provider Notification Table (RNT) defined in ETSI TS 102 323
contextIdType - the contextIdType
Returns:
a ContentReferencingManager or null for receivers without a DVB tuner

getInstance

public static ContentReferencingManager getInstance(ResolutionProviderInformation provider)
Get a ContentReferencingManager for a specified context and resolution provider. The context and resolution provider are specified by the supplied ResolutionProviderInformation.

Parameters:
provider - the ResolutionProviderInformation
Returns:
a ContentReferencingManager

getInstance

public static ContentReferencingManager getInstance(Locator URL)
Get a ContentReferencingManager which uses the specified server for IP-based queries. If used for non IP-based queries the platform will choose the context and resolution provider preferences.

Parameters:
URL - the address of the IP server
Returns:
a ContentReferencingManager

resolveCRID

public abstract void resolveCRID(CRID cr,
                                 int resolutionSources,
                                 ResolutionListener listener)
Used to resolve a CRID. It is preferable to use resolveCRIDList() where possible. All the specified resolution sources are searched in the order described above until resolution is completed. This method will not attempt to tune if the resolutionSources does not include RESOLVE_DVB_OTHER.

Parameters:
cr - The query CRID we are trying to resolve.
resolutionSources - A bitwise OR of RESOLVE_LOCAL, RESOLVE_DVB_ACTUAL etc that specifies which sources of resolution information to use.
listener - Holds a reference to the client class of the callback function, allowing us to call the appropriate callback when resolution is complete.

resolveCRID

public abstract void resolveCRID(CRID cr,
                                 ResolutionListener listener)
Used to resolve a CRID. It is preferable to use resolveCRIDList() where possible. All available resolution sources are searched in the order described above until resolution is completed.

Parameters:
cr - The query CRID we are trying to resolve.
listener - Holds a reference to the client class of the callback function, allowing us to call the appropriate callback when resolution is complete.

resolveCRIDList

public abstract void resolveCRIDList(CRID[] crList,
                                     ResolutionListener listener)

Used to resolve a list of CRIDs. This function should be used in preference to resolveCRID as it permits a more efficient implementation for resolution over IP or from broadcast. For IP it enables multiple resolution queries to be bundled into a single HTTP request. In the broadcast case it means that tuning to a new service and waiting for the location resolution information to be repeated does not have to be done for each and every CRID.

Note that the number of callbacks generated will be exactly equal to the length of the list. i.e. there is a separate callback for each CRID.

Parameters:
crList - The list of query Content References we are trying to resolve.
listener - Holds a reference to the client class of the callback function, allowing us to call the appropriate callback when resolution is complete.

resolveCRIDList

public abstract void resolveCRIDList(CRID[] crList,
                                     int resolutionSources,
                                     ResolutionListener listener)

Used to resolve a list of CRIDs. All the specified resolution sources are searched in the order described above until resolution is completed. The method will not attempt to tune if the resolutionSources does not include RESOLVE_DVB_OTHER. This function should be used in preference to resolveCRID as it permits a more efficient implementation for resolution over IP or from broadcast. For IP it enables multiple resolution queries to be bundled into a single HTTP request. In the broadcast case it means that tuning to a new service and waiting for the location resolution information to be repeated does not have to be done for each and every CRID.

Note that the number of callbacks generated will be exactly equal to the length of the list. i.e. there is a separate callback for each CRID.

Parameters:
crList - The list of query Content References we are trying to resolve.
resolutionSources - A bitwise OR of RESOLVE_LOCAL, RESOLVE_DVB_ACTUAL etc that specifies which sources of resolution information to use.
listener - Holds a reference to the client class of the callback function, allowing us to call the appropriate callback when resolution is complete.

getResolutionProviderInformation

public static ResolutionProviderInformation[] getResolutionProviderInformation(int resolutionSources)
Get a set of ResolutionProviderInformation for the specified resolution sources.

Parameters:
resolutionSources - A bitwise OR of RESOLVE_LOCAL, RESOLVE_DVB_ACTUAL etc that specifies which sources of resolution information to include in the returned information.
Returns:
an array of ResolutionProviderInformation

isComplete

public abstract boolean isComplete(java.lang.String CRIDAuthority)
Determine whether this ContentReferencingManager provides a complete resolution service for the specified CRID authority.

Parameters:
CRIDAuthority - the CRID Authority
Returns:
true if a complete resolution service is provided