Home » openjdk-7 » javax » imageio » spi » [javadoc | source]
javax.imageio.spi
abstract public class: IIOServiceProvider [javadoc | source]
java.lang.Object
   javax.imageio.spi.IIOServiceProvider

All Implemented Interfaces:
    RegisterableService

Direct Known Subclasses:
    ImageWriterSpi, ImageInputStreamSpi, ImageReaderSpi, ImageOutputStreamSpi, ImageReaderWriterSpi, ImageTranscoderSpi

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.
Field Summary
protected  String vendorName    A String to be returned from getVendorName, initially null. Constructors should set this to a non-null value. 
protected  String version    A String to be returned from getVersion, initially null. Constructors should set this to a non-null value. 
Constructor:
 public IIOServiceProvider() 
 public IIOServiceProvider(String vendorName,
    String version) 
    Constructs an IIOServiceProvider with a given vendor name and version identifier.
    Parameters:
    vendorName - the vendor name.
    version - a version identifier.
    Throws:
    IllegalArgumentException - if vendorName is null.
    IllegalArgumentException - if version is null.
    exception: IllegalArgumentException - if vendorName is null.
    exception: IllegalArgumentException - if version is null.
Method from javax.imageio.spi.IIOServiceProvider Summary:
getDescription,   getVendorName,   getVersion,   onDeregistration,   onRegistration
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.imageio.spi.IIOServiceProvider Detail:
 abstract public 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.
 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.

 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.

 public  void onDeregistration(ServiceRegistry registry,
    Class<?> category) 
    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.

 public  void onRegistration(ServiceRegistry registry,
    Class<?> category) 
    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.