org.dvb.spi
Class ProviderRegistry

java.lang.Object
  extended byorg.dvb.spi.ProviderRegistry

public class ProviderRegistry
extends java.lang.Object

Registry of providers.


Constructor Summary
protected ProviderRegistry()
          This constructor is provided for use by implementations and by other specifications that extend this class.
 
Method Summary
 java.lang.String[] getInstalledProviders()
          Return the names of all installed providers.
static ProviderRegistry getInstance()
           
 java.lang.String getProviderVersion(java.lang.String provider)
          Return the version of an installed provider.
 void registerSystemBound(SystemBoundProvider p)
          Registers a provider.
 void registerXletBound(XletBoundProvider p)
          Registers a provider.
 void unregister(Provider p)
          Unregister a provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderRegistry

protected ProviderRegistry()
This constructor is provided for use by implementations and by other specifications that extend this class. It is not to be used by normal applications.

Method Detail

getInstance

public static ProviderRegistry getInstance()

registerXletBound

public void registerXletBound(XletBoundProvider p)
                       throws ProviderFailedInstallationException
Registers a provider. Note that providers might be installed "automatically" by the terminal, e.g. due to signalling.

Throws:
java.lang.IllegalArgumentException - if Provider does not export a valid set of services as determined by Provider.getServiceProviderInterfaces(), or if the provider does not have have a non-null Xlet context.
ProviderFailedInstallationException - if the organisation_id in the name of the provider does not match the organisation_id in a certificate which can authenticate the provider class.
java.lang.SecurityException - if the caller, for all of the SPIs implemented by the provider, does not have a ProviderPermission whose name is the fully qualified name of the class returned by Provider getServiceProviderInterfaces and whose action is "xlet".
See Also:
Provider.getServiceProviderInterfaces(), XletBoundProvider.getBoundXletContext(), XletBoundProvider.getBoundPBPXletContext()

registerSystemBound

public void registerSystemBound(SystemBoundProvider p)
                         throws ProviderFailedInstallationException
Registers a provider. Note that providers might be installed "automatically" by the terminal, e.g. due to signalling.

Throws:
java.lang.IllegalArgumentException - if Provider does not expoort a valid set of services as determined by Provider.getServiceProviderInterfaces()
ProviderFailedInstallationException - if the organisation_id in the name of the provider does not match the organisation_id in a certificate which can authenticate the provider class.
java.lang.SecurityException - if the caller, for all of the SPIs implemented by the provider, does not have a ProviderPermission whose name is the fully qualified name of the class returned by Provider getServiceProviderInterfaces and whose action is "system".
See Also:
Provider.getServiceProviderInterfaces()

unregister

public void unregister(Provider p)
Unregister a provider. Xlets that "manually" register a provider using one of the register methods of this class shall unregister that provider before returning from a successful destroyXlet call.

See Also:
Xlet.destroyXlet(boolean)

getInstalledProviders

public java.lang.String[] getInstalledProviders()
Return the names of all installed providers. These are the names returned by the getName methods on those Providers. Provider names shall be encoded as defined for permission request file in the main body of the present document. For example "0x0000000B.EMV_PK11.VISA_REVOLVER".

Returns:
the names of all installed providers
See Also:
Provider.getName()

getProviderVersion

public java.lang.String getProviderVersion(java.lang.String provider)
Return the version of an installed provider.

Parameters:
provider - the name of a provider as returned by the method getInstalledProviders
Returns:
the version of the specified provider
Throws:
java.lang.IllegalArgumentException - if the provider name is not one of those installed, i.e. is not one returned from a call to getInstalledProviders
See Also:
Provider.getVersion()