APIdia Launch Partner
Top Description Fields Constructors Methods
javax.imageio.spi

public abstract Class IIOServiceProvider

extends Object
implements RegisterableService
Class Inheritance
All Implemented Interfaces
javax.imageio.spi.RegisterableService
Known Direct Subclasses
javax.imageio.spi.ImageInputStreamSpi, javax.imageio.spi.ImageOutputStreamSpi, javax.imageio.spi.ImageReaderWriterSpi, javax.imageio.spi.ImageTranscoderSpi
Imports
java.util.Locale, javax.imageio.spi.RegisterableService, .ServiceRegistry

A superinterface for functionality common to all Image I/O service provider interfaces (SPIs). For more information on service provider classes, see the class comment for the IIORegistry class.
See Also
IIORegistry, javax.imageio.spi.ImageReaderSpi, javax.imageio.spi.ImageWriterSpi, javax.imageio.spi.ImageTranscoderSpi, javax.imageio.spi.ImageInputStreamSpi, javax.imageio.spi.ImageOutputStreamSpi

Field Summary

Modifier and TypeField and Description
protected String
vendorName

A String to be returned from getVendorName, initially null.

protected String
version

A String to be returned from getVersion, initially null.

Constructor Summary

AccessConstructor and Description
public
IIOServiceProvider(String
the vendor name.
vendorName
,
String
a version identifier.
version
)

Constructs an IIOServiceProvider with a given vendor name and version identifier.

public
IIOServiceProvider()

Constructs a blank IIOServiceProvider.

Method Summary

Modifier and TypeMethod and Description
public abstract String

Returns:

a String containing a description of this service provider.
getDescription
(Locale
a Locale for which the return value should be localized.
locale
)

Returns a brief, human-readable description of this service provider and its associated implementation.

public String

Returns:

a non-null String containing the name of the vendor.
getVendorName
()

Returns the name of the vendor responsible for creating this service provider and its associated implementation.

public String

Returns:

a non-null String containing the version of this service provider.
getVersion
()

Returns a string describing the version number of this service provider and its associated implementation.

public void
onDeregistration(ServiceRegistry registry, Class<?> category)

Implements javax.imageio.spi.RegisterableService.onDeregistration.

A callback that will be whenever the Spi class has been deregistered from a ServiceRegistry.

public void
onRegistration(ServiceRegistry registry, Class<?> category)

Implements javax.imageio.spi.RegisterableService.onRegistration.

A callback that will be called exactly once after the Spi class has been instantiated and registered in a ServiceRegistry.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

vendorNameback to summary
protected String vendorName

A String to be returned from getVendorName, initially null. Constructors should set this to a non-null value.

versionback to summary
protected String version

A String to be returned from getVersion, initially null. Constructors should set this to a non-null value.

Constructor Detail

IIOServiceProviderback to summary
public IIOServiceProvider(String vendorName, String version)

Constructs an IIOServiceProvider with a given vendor name and version identifier.

Parameters
vendorName:String

the vendor name.

version:String

a version identifier.

Exceptions
IllegalArgumentException:
  • if vendorName is null.
  • if version is null.
IIOServiceProviderback to summary
public IIOServiceProvider()

Constructs a blank IIOServiceProvider. It is up to the subclass to initialize instance variables and/or override method implementations in order to ensure that the getVendorName and getVersion methods will return non-null values.

Method Detail

getDescriptionback to summary
public abstract String getDescription(Locale locale)

Returns a brief, human-readable description of this service provider and its associated implementation. The resulting string should be localized for the supplied Locale, if possible.

Parameters
locale:Locale

a Locale for which the return value should be localized.

Returns:String

a String containing a description of this service provider.

getVendorNameback to summary
public String getVendorName()

Returns the name of the vendor responsible for creating this service provider and its associated implementation. Because the vendor name may be used to select a service provider, it is not localized.

The default implementation returns the value of the vendorName instance variable.

Returns:String

a non-null String containing the name of the vendor.

getVersionback to summary
public String getVersion()

Returns a string describing the version number of this service provider and its associated implementation. Because the version may be used by transcoders to identify the service providers they understand, this method is not localized.

The default implementation returns the value of the version instance variable.

Returns:String

a non-null String containing the version of this service provider.

onDeregistrationback to summary
public void onDeregistration(ServiceRegistry registry, Class<?> category)

Implements javax.imageio.spi.RegisterableService.onDeregistration.

A callback that will be whenever the Spi class has been deregistered from a ServiceRegistry.

Only the registry should call this method.

The default implementation does nothing.

See Also
ServiceRegistry#deregisterServiceProvider(Object provider)
onRegistrationback to summary
public void onRegistration(ServiceRegistry registry, Class<?> category)

Implements javax.imageio.spi.RegisterableService.onRegistration.

A callback that will be called exactly once after the Spi class has been instantiated and registered in a ServiceRegistry. This may be used to verify that the environment is suitable for this service, for example that native libraries can be loaded. If the service cannot function in the environment where it finds itself, it should deregister itself from the registry.

Only the registry should call this method.

The default implementation does nothing.

See Also
ServiceRegistry#registerServiceProvider(Object provider)