org.dvb.spi.selection
Interface SelectionProvider

All Superinterfaces:
Provider, SystemBoundProvider

public interface SelectionProvider
extends SystemBoundProvider

A provider of service selection. For example, a SelectionProvider can be installed in an always-running service-unbound xlet to provide the ability to reach services that do not have standarized SI signalling in an IPTV network.

The process for determining which Provider (if any) shall be used to present a transport independent service is defined by the following steps in the order given.

1) Consult the service list. If the service appears in the service list then make an selection between the available sources of that Service as defined by ServiceContext.select(Service).

2) If there one Provider registered to support the locator scheme of the locator for the Service, ask that Provider to present that service. The service selection operation shall fail if the provider cannot present it.

3) If more than one Provider has registed as supporting the locator scheme of the locator for the Service, offer the Service to each Provider in turn until either one of them does not fail or no more Providers are available in which case the service selection operation shall fail.

NOTE: If the performance penalty of polling multiple Providers for the same locator scheme is undesirable, service providers / operators using multiple Providers should ensure they use different Locator schemes.

Providers should select the transport dependent locators returned such that there is no collision the transport dependent locators returned by other Providers that may offer the same transport independent service. Where a GEM terminal is managed by a service provider / operator, the service provider / operator should enforce this if they permit more than one Provider to be installed.

Where there is a collision and a transport dependent locator can be accessed by more than one Provider, the selection of which to use is implementation dependent.

A SelectionProvider may inform the implementation of the actual location of a service by two mechanisms.

The mechanism by which the actual location of a service is determined may change dynamically, e.g. as the set of services available in the network changes.

Since:
MHP 1.1.3
See Also:
Provider.getServiceProviderInterfaces()

Method Summary
 ServiceDescription[] getServiceDescriptions(ServiceReference[] services)
          Called by the terminal to request service description information from an SI source.
 ServiceReference[] getServiceList()
          Give a list of the services provided by this provider.
 LocatorScheme[] getSupportedLocatorSchemes()
          Returns the list of locator schemes handled by this provider.
 void init(SelectionProviderContext c)
          Called by the platform to register its handler for events originating in the provider.
 SelectionSession newSession(ServiceReference service)
          Called by the platform to create a session to manage the presentation of a service.
 
Methods inherited from interface org.dvb.spi.Provider
getName, getServiceProviderInterfaces, getVersion, providerRegistered, providerUnregistered
 

Method Detail

init

void init(SelectionProviderContext c)
Called by the platform to register its handler for events originating in the provider. This method shall be called after providerRegistered and before any other methods on the provider are called. Only one handler can be registered at any one time.

Parameters:
c - the handler

getServiceList

ServiceReference[] getServiceList()
Give a list of the services provided by this provider. The services returned from this method shall be merged into the platform service list as returned by javax.tv.service.SIManager.filterServices (null). Where the transport independent identification of a service is equal to one already in the service list then that transport independent service shall acquire an additional transport dependent service. Where the transport independent identification of a service is not equal to one already in the service list, a new service shall be added to the service list and SIChangeEvents generated to appropriate listeners.

The list of services returned shall include both those where the actual location is returned in the ServiceReference and those where the actual location is to be returned from a later call to the select method.

Returns:
a list of ServiceReference instances.
See Also:
SelectionProviderContext.serviceListChanged(ServiceReference[])

newSession

SelectionSession newSession(ServiceReference service)
Called by the platform to create a session to manage the presentation of a service. A new session shall be created for each service to be presented by a provider.

Parameters:
service - the service whose presentation is managed through this session
Returns:
a session

getSupportedLocatorSchemes

LocatorScheme[] getSupportedLocatorSchemes()
Returns the list of locator schemes handled by this provider. This list should not change over time; it is expected that platforms will usually call this method exactly once, after installation of a provider. There is no method to unregister a scheme other than unregistering the provider.


getServiceDescriptions

ServiceDescription[] getServiceDescriptions(ServiceReference[] services)
Called by the terminal to request service description information from an SI source. The output shall be returned in an array of the same size and order as the input. If information is not available on any service listed in the input then the corresponding entry in the results array shall be null.

Parameters:
services - References identifying the services whose descriptions are requested
Returns:
an array of service descriptions