javax.imageio.spi

Class IIOServiceProvider

public abstract class IIOServiceProvider extends Object implements RegisterableService

An abstract superclass for service providers that perform image I/O.

Since: 1.4

Field Summary
protected StringvendorName
The vendor of this service provider, or null if the subclass constructor did not set this field.
protected Stringversion
The version of this service provider, or null if the subclass constructor did not set this field.
Constructor Summary
IIOServiceProvider(String vendorName, String version)
Constructs a general IIOServiceProvider, given the vendor name and a version string.
IIOServiceProvider()
Constructs a general IIOServiceProvider without specifying a vendor name and a version string.
Method Summary
abstract StringgetDescription(Locale locale)
Returns a short description of this service provider that can be presented to a human user.
StringgetVendorName()
Returns the name of the vendor of this service provider.
StringgetVersion()
Returns an identifier string for the version of this service provider.
voidonDeregistration(ServiceRegistry registry, Class<?> category)
Informs this service provider that it has been de-registered from a {@link ServiceRegistry}.
voidonRegistration(ServiceRegistry registry, Class<?> category)
Informs this service provider that it has been registered in a {@link ServiceRegistry}.

Field Detail

vendorName

protected String vendorName
The vendor of this service provider, or null if the subclass constructor did not set this field.

See Also: getVendorName

version

protected String version
The version of this service provider, or null if the subclass constructor did not set this field.

See Also: getVersion

Constructor Detail

IIOServiceProvider

public IIOServiceProvider(String vendorName, String version)
Constructs a general IIOServiceProvider, given the vendor name and a version string.

Throws: IllegalArgumentException if vendorName or version is null.

IIOServiceProvider

public IIOServiceProvider()
Constructs a general IIOServiceProvider without specifying a vendor name and a version string. The subclass constructor should set the {@link #vendorName} and {@link #version} to non-null values.

Method Detail

getDescription

public abstract String getDescription(Locale locale)
Returns a short description of this service provider that can be presented to a human user.

Parameters: locale the locale for which the description string should be localized.

getVendorName

public String getVendorName()
Returns the name of the vendor of this service provider.

getVersion

public String getVersion()
Returns an identifier string for the version of this service provider.

onDeregistration

public void onDeregistration(ServiceRegistry registry, Class<?> category)
Informs this service provider that it has been de-registered from a {@link ServiceRegistry}. If this provider had been registered as an implementor for several service categories, its onDeregistration method will be called multiple times. The default implementation does nothing.

Parameters: registry the registry from which this service provider has been removed. category the service category for which this provider has been registered as an implementor.

onRegistration

public void onRegistration(ServiceRegistry registry, Class<?> category)
Informs this service provider that it has been registered in a {@link ServiceRegistry}. If this provider gets registered as an implementor for several service categories, its onRegistration method will be called multiple times. The default implementation does nothing.

Parameters: registry the registry to which this service provider has been added. category the service category for which this provider has been registered as an implementor.