java.lang.Object
javax.imageio.spi.IIOServiceProvider
- All Implemented Interfaces:
- RegisterableService
- Direct Known Subclasses:
- ImageInputStreamSpi,- ImageOutputStreamSpi,- ImageReaderWriterSpi,- ImageTranscoderSpi
public abstract class IIOServiceProvider extends Object implements RegisterableService
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 SummaryFields Modifier and Type Field Description protected StringvendorNameAStringto be returned fromgetVendorName, initiallynull.protected StringversionAStringto be returned fromgetVersion, initially null.
- 
Constructor SummaryConstructors Constructor Description IIOServiceProvider()Constructs a blankIIOServiceProvider.IIOServiceProvider(String vendorName, String version)Constructs anIIOServiceProviderwith a given vendor name and version identifier.
- 
Method SummaryModifier and Type Method Description abstract StringgetDescription(Locale locale)Returns a brief, human-readable description of this service provider and its associated implementation.StringgetVendorName()Returns the name of the vendor responsible for creating this service provider and its associated implementation.StringgetVersion()Returns a string describing the version number of this service provider and its associated implementation.voidonDeregistration(ServiceRegistry registry, Class<?> category)A callback that will be whenever the Spi class has been deregistered from aServiceRegistry.voidonRegistration(ServiceRegistry registry, Class<?> category)A callback that will be called exactly once after the Spi class has been instantiated and registered in aServiceRegistry.
- 
Field Details- 
vendorNameAStringto be returned fromgetVendorName, initiallynull. Constructors should set this to a non-nullvalue.
- 
versionAStringto be returned fromgetVersion, initially null. Constructors should set this to a non-nullvalue.
 
- 
- 
Constructor Details- 
IIOServiceProviderConstructs anIIOServiceProviderwith a given vendor name and version identifier.- Parameters:
- vendorName- the vendor name.
- version- a version identifier.
- Throws:
- IllegalArgumentException- if- vendorNameis- null.
- IllegalArgumentException- if- versionis- null.
 
- 
IIOServiceProviderpublic IIOServiceProvider()Constructs a blankIIOServiceProvider. It is up to the subclass to initialize instance variables and/or override method implementations in order to ensure that thegetVendorNameandgetVersionmethods will return non-nullvalues.
 
- 
- 
Method Details- 
onRegistrationA callback that will be called exactly once after the Spi class has been instantiated and registered in aServiceRegistry. 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. - Specified by:
- onRegistrationin interface- RegisterableService
- Parameters:
- registry- a- ServiceRegistrywhere this object has been registered.
- category- a- Classobject indicating the registry category under which this object has been registered.
- See Also:
- ServiceRegistry.registerServiceProvider(Object provider)
 
- 
onDeregistrationA callback that will be whenever the Spi class has been deregistered from aServiceRegistry.Only the registry should call this method. The default implementation does nothing. - Specified by:
- onDeregistrationin interface- RegisterableService
- Parameters:
- registry- a- ServiceRegistryfrom which this object is being (wholly or partially) deregistered.
- category- a- Classobject indicating the registry category from which this object is being deregistered.
- See Also:
- ServiceRegistry.deregisterServiceProvider(Object provider)
 
- 
getVendorNameReturns 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 vendorNameinstance variable.- Returns:
- a non-null Stringcontaining the name of the vendor.
 
- 
getVersionReturns 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 versioninstance variable.- Returns:
- a non-null Stringcontaining the version of this service provider.
 
- 
getDescriptionReturns a brief, human-readable description of this service provider and its associated implementation. The resulting string should be localized for the suppliedLocale, if possible.- Parameters:
- locale- a- Localefor which the return value should be localized.
- Returns:
- a Stringcontaining a description of this service provider.
 
 
-