it.dtt.ca
Class CAManagerFactory

java.lang.Object
  extended by it.dtt.ca.CAManagerFactory

public final class CAManagerFactory
extends java.lang.Object

This class represent a factory for Conditional Access managers. It is the entry point of the CA API defined in this package.


Nested Class Summary
 class CAManagerFactory.SessionCloser
          This class allows a session to be opened in an asynchronous way.
 class CAManagerFactory.SessionOpener
          This class allows a session to be opened in an asynchronous way.
 
Field Summary
static java.lang.String CONAX
          Conax provider name.
static java.lang.String IRDETO
          Irdeto provider name.
static java.lang.String NAGRA
          Nagra provider name.
static java.lang.String SATSA
          SATSA provider name.
 
Constructor Summary
CAManagerFactory()
           
 
Method Summary
 void closeSession(org.davic.resources.ResourceClient resourceClient)
          Close the current session releasing any allocated resources.
static CAManagerFactory getInstance(java.lang.String provider, java.lang.String broadcaster)
          This method returns the instance of the CAManagerFactory for the specified provider name.
static CAManagerFactory getInstance(java.lang.String provider, java.lang.String broadcaster, javax.tv.service.selection.ServiceContext serviceContext)
          This method returns the instance of the CAManagerFactory for the current service in the specified Service Context.
 CAManager openSession(org.davic.resources.ResourceClient resourceClient)
          This method is used to open a session with the Conditional Access API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONAX

public static final java.lang.String CONAX
Conax provider name.

See Also:
Constant Field Values

IRDETO

public static final java.lang.String IRDETO
Irdeto provider name.

See Also:
Constant Field Values

NAGRA

public static final java.lang.String NAGRA
Nagra provider name.

See Also:
Constant Field Values

SATSA

public static final java.lang.String SATSA
SATSA provider name.

See Also:
Constant Field Values
Constructor Detail

CAManagerFactory

public CAManagerFactory()
Method Detail

getInstance

public static CAManagerFactory getInstance(java.lang.String provider,
                                           java.lang.String broadcaster)
                                    throws NoSuchProviderException,
                                           AccessDeniedException
This method returns the instance of the CAManagerFactory for the specified provider name. If such provider does not exist, or it is not currently available, or access to it is denied, an exception is thrown. In case of more broadcasters using the same CA provider to protect their respective services, the CA kernel has the responsibility to initialize the relevant CA system parameters in such a way that no access is allowed to data not owned by the current active service.

Parameters:
provider - the name of the provider of Conditional Access functionalities, e.g. "Nagra", "Irdeto", "Conax", etc.
broadcaster - the name of the broadcaster providing the service, as reported in the DVB Service Description Table
Returns:
an instance of the required CAManagerFactory
Throws:
AccessDeniedException - if access to the specific service context is denied due to context specific reasons.
NoSuchProviderException - if the indicated provider does not exist or is not available.

getInstance

public static CAManagerFactory getInstance(java.lang.String provider,
                                           java.lang.String broadcaster,
                                           javax.tv.service.selection.ServiceContext serviceContext)
                                    throws NoSuchServiceContextException,
                                           AccessDeniedException
This method returns the instance of the CAManagerFactory for the current service in the specified Service Context. If the current service is Free-to-air this method will return null. If such Service Context does not exist, or it is not currently available, an exception is thrown.

Parameters:
provider - the name of the provider of Conditional Access functionalities, e.g. "Nagra", "Irdeto", "Conax", etc.
broadcaster - the name of the broadcaster providing the service, as reported in the DVB Service Description Table
serviceContext - the Service Context of the current channel to which the Conditional Access System is associated.
Returns:
an instance of the required CAManagerFactory or null
Throws:
AccessDeniedException - if access to the specific service context is denied due to context specific reasons.
NoSuchServiceContextException - if the indicated Service Context does not exist or is not available.

openSession

public CAManager openSession(org.davic.resources.ResourceClient resourceClient)
This method is used to open a session with the Conditional Access API. Some CA implementations may want to restrict the openSession method to one ResourceClient at at a time, in this case a runtime exception ( SessionAlreadyOpenedException ) may be thrown. The circumstances when ResourceClient is called should be defined in the CA system specific documentation.

Parameters:
resourceClient - the object asking for access to the CA API.
Returns:
a CAManager instance which gives access to all the CA functionality of the selected provider.

closeSession

public void closeSession(org.davic.resources.ResourceClient resourceClient)
                  throws OwnerUnknownException,
                         NoSessionOpenedException
Close the current session releasing any allocated resources. The circumstances when the ResourceClient is called should be defined in the CA system specific documentation.

Parameters:
resourceClient - the object asking for access to the CA API
Throws:
OwnerUnknownException - thrown when the resourceClient is unknown. This is a runtime exception.
NoSessionOpenedException - thrown when the session is closed.