public class SIManagerImpl extends SIManager implements ReceiverListener, Runnable
The SIManager may be used to set some global parameters such as preferred language for text information which may be delivered as multilingual strings to the receiver.
| Constructor and Description |
|---|
SIManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(SIRequest toCancel)
This implements the cancel of an async.
|
ServiceList |
filterServices(ServiceFilter filter)
Creates a ServiceList object based on the conditions
specified in a filter parameter.
|
Vector |
findSIElements(SIRequestImpl request)
Find a match in the SI cache for the provided request; a variety
of requests are served by this method.
|
static FavoriteServicesName[] |
getFavoriteServices(String localName) |
static FavoriteServicesName[] |
getFavoriteServicesNames() |
String |
getPreferredLanguage()
Called to determine the preferred language for returning string-type
values.
|
RatingDimension |
getRatingDimension(String name)
Returns the Rating Dimension corresponding to the specified Dimension
name.
|
Service |
getService(Locator locator)
This method can be used to obtain a specific Service based on a
Locator.
|
String[] |
getSupportedDimensions()
Provides a list of names of available rating dimensions for the local
rating region.
|
Transport[] |
getTransports()
Reports the various content delivery mechanisms available on
this platform.
|
boolean |
hasPermission(Locator locator) |
void |
makeRequest(SIRequestImpl request)
This method handles asynchronous SIElement requests, if the
request can be full-filled by the existing cached data then the
results are immediatley returned.
|
void |
notifyChange(SIChangeEvent event)
This interface method handles SI events generated by the receiver,
implementors are required to have their receivers generate the SI event
passing the event to this method.
|
static void |
putFavoriteServices(String localName,
String[] shortNames) |
void |
registerInterest(Locator locator,
boolean active)
This method provides a hint to the SI Database that the application
would like to have as complete SI information as possible about the
specified SI element.
|
SIRequest |
retrieveProgramEvent(Locator locator,
SIRequestor requestor)
This method can be used to retrieve a specific ProgramEvent based on a
Locator.
|
SIRequest |
retrieveServiceDetails(Locator locator,
SIRequestor requestor)
This method can be used to retrieve specific ServiceDetails (meta-data
for a Service) based on a Locator.
|
SIRequest |
retrieveSIElement(Locator locator,
SIRequestor requestor)
This method retrieves an SIElement corresponding to the specified
Locator.
|
void |
run()
This async.
|
void |
setPreferredLanguage(String language)
Sets the language used to return any textual information from the SI
related classes and interfaces (e.g.
|
boolean |
SIElementExists(SIElement element) |
createInstancepublic static FavoriteServicesName[] getFavoriteServices(String localName)
public static FavoriteServicesName[] getFavoriteServicesNames()
public void setPreferredLanguage(String language)
This method is used to temporarily override the system-level preferred language within the abstractSI package.
setPreferredLanguage in class SIManagerlanguage - A string representing a language code defining the
language associated with this component. It contains a three-character
code as specified by ISO 639.2/B. If the input parameter is null, the
application set preference is cancelled.public String getPreferredLanguage()
getPreferredLanguage in class SIManagerpublic void registerInterest(Locator locator, boolean active) throws InvalidLocatorException, SecurityException
For example, if the locator points to a bouquet, the database may start caching ServiceDetails information for services which are part of the specified bouquet. If the locator points to a Service, the database may start caching ProgramEvents for this service.
registerInterest in class SIManagerlocator - A locator referencing the SI element of interest.active - A flag indicating whether this interest is active
or not. True means that the application is
interested in the data; false means that the
application wants to cancel a previously shown interest for the
same locator.InvalidLocatorException - If locator does not
reference a valid SIElement for expressing interest.SecurityException - if the caller does not have
javax.tv.service.ReadPermission(locator)ReadPermissionpublic String[] getSupportedDimensions()
getSupportedDimensions in class SIManagerRatingDimensionpublic RatingDimension getRatingDimension(String name) throws SIException
getRatingDimension in class SIManagername - Name of the requested rating dimensionSIException - If name is not a supported
rating dimension, as returned by getSupportedDimensions().SIManager.getSupportedDimensions()public Transport[] getTransports()
getTransports in class SIManagerTransport objects representing
the content delivery mechanisms on this platform.public SIRequest retrieveSIElement(Locator locator, SIRequestor requestor) throws InvalidLocatorException, SecurityException
For example, multiple SIElements may be returned when the locator represents identical content delivered over different media (terrestrial, satellite, cable, etc) or a specific program event made available at different times, possibly on different services.
This call may return different types of SIElements based on the specified locator. E.g. if the locator is transport independent locator, a corresponding Service is returned; if the locator is transport dependent, ServiceDetails object is returned; if the locator represents a program event; ProgramEvent object is returned; etc.
This method delivers its results asynchronously.
retrieveSIElement in class SIManagerlocator - A locator referencing one or more SIElements.requestor - The SIRequestor to be notified
when this retrieval operation completes.SIRequest object identifying this
asynchronous retrieval request.InvalidLocatorException - If locator does not
reference a valid SIElement.SecurityException - if the caller does not have
javax.tv.service.ReadPermission(locator)SIElement,
ProgramEventpublic Service getService(Locator locator) throws InvalidLocatorException, SecurityException
Note that the locator may point to an SIElement lower in the hierarchy (such as a ProgramEvent). In such a case the Service which the ProgramEvent is part of will be returned.
getService in class SIManagerlocator - A locator specifying a ServiceInvalidLocatorException - If locator does not
reference a valid Service.SecurityException - if the caller does not have
javax.tv.service.ReadPermission(locator)ReadPermissionpublic SIRequest retrieveServiceDetails(Locator locator, SIRequestor requestor) throws InvalidLocatorException, SecurityException
Also since a transport-independent locator may represent multiple transport-dependent services, an array of ServiceDetails may be returned.
If multiple ServiceDetails objects are available for the given locator (e.i. the locator is transport independent), this call may return only one of them (choice made by implementation based on e.g. user preferences and availability).
This is because it will probably take a long time to retrieve all of them while one could be returned very quickly. It may not even be possible to always get all of them (e.g. tuning would be required).
If the application really wants to get all of them, it can always transform the trnsport-independent locator into multiple transport-dependent locators and retrieve the ServiceDetails for each one of them.
This method delivers its results asynchronously.
retrieveServiceDetails in class SIManagerlocator - A locator referencing a Servicerequestor - The SIRequestor to be notified
when this retrieval operation completes.SIRequest object identifying this
asynchronous retrieval request.InvalidLocatorException - If locator does not
reference a valid Service.SecurityException - if the caller does not have
javax.tv.service.ReadPermission(locator)Locator,
ServiceDetails,
ReadPermissionpublic SIRequest retrieveProgramEvent(Locator locator, SIRequestor requestor) throws InvalidLocatorException, SecurityException
This method delivers its results asynchronously.
retrieveProgramEvent in class SIManagerlocator - A locator referencing a ProgramEventrequestor - The SIRequestor to be notified
when this retrieval operation completes.SIRequest object identifying this
asynchronous retrieval request.InvalidLocatorException - If locator does not
reference a valid ProgramEvent.SecurityException - if the caller does not have
javax.tv.service.ReadPermission(locator)ProgramEvent,
ReadPermissionpublic ServiceList filterServices(ServiceFilter filter)
null, a list of all known services is
generated. Only Service instances for which the caller has
javax.tv.service.ReadPermission on the underlying locator will
be present in the returned list.
Note that the accept method of the given
ServiceFilter will be invoked for each
Service to be filtered using the same application
thread that invokes filterServices.
filterServices in class SIManagerfilter - A ServiceFilter by which to generate
the requested service list, or null.ServiceList object created based on
the specified filtering rules.ServiceFilter.accept(javax.tv.service.Service)public void makeRequest(SIRequestImpl request)
public boolean hasPermission(Locator locator)
public Vector findSIElements(SIRequestImpl request)
request - the request for match is being found.public boolean cancel(SIRequest toCancel)
public boolean SIElementExists(SIElement element)
public void notifyChange(SIChangeEvent event)
notifyChange in interface ReceiverListenerpublic void run()
i will continue to work properly.Copyright © 2012 code4tv.com. All Rights Reserved.