ProviderRegistry

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.dvb.spi
Class ProviderRegistry

    java.lang.Object
      org.dvb.spi.ProviderRegistry

    public class ProviderRegistry

extends Object

Registry of providers.

Since:
  MHP 1.1.3

Method Summary
`String[]` | `getInstalledProviders()` Return the names of all installed providers.
`static ProviderRegistry` | `getInstance()` Return the singleton provider registry as seen by the calling application.
`String` | `getProviderVersion(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
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static ProviderRegistry getInstance()

  Return the singleton provider registry as seen by the calling application.

  Returns:
    the provider registry

### 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.

  Parameters:
    `p` - the provider to register
  Throws:
    `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.
    `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.

  Parameters:
    `p` - the provider to register
  Throws:
    `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.
    `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.

  Parameters:
    `p` - the provider to unregister
  See Also:
    `Xlet.destroyXlet(boolean)`

### getInstalledProviders

    public 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 String getProviderVersion(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:
    `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()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD