javax.imageio.spi
public abstract class IIOServiceProvider extends Object implements RegisterableService
Modifier and Type | Field and Description |
---|---|
protected String |
vendorName
The vendor of this service provider, or
null if the
subclass constructor did not set this field. |
protected String |
version
The version of this service provider, or
null if the
subclass constructor did not set this field. |
Constructor and Description |
---|
IIOServiceProvider()
Constructs a general
IIOServiceProvider without
specifying a vendor name and a version string. |
IIOServiceProvider(String vendorName,
String version)
Constructs a general
IIOServiceProvider , given the
vendor name and a version string. |
Modifier and Type | Method and Description |
---|---|
abstract String |
getDescription(Locale locale)
Returns a short description of this service provider that can be
presented to a human user.
|
String |
getVendorName()
Returns the name of the vendor of this service provider.
|
String |
getVersion()
Returns an identifier string for the version of this service
provider.
|
void |
onDeregistration(ServiceRegistry registry,
Class<?> category)
Informs this service provider that it has been de-registered from
a
ServiceRegistry . |
void |
onRegistration(ServiceRegistry registry,
Class<?> category)
Informs this service provider that it has been registered in a
ServiceRegistry . |
protected String vendorName
null
if the
subclass constructor did not set this field.getVendorName()
protected String version
null
if the
subclass constructor did not set this field.getVersion()
public IIOServiceProvider(String vendorName, String version)
IIOServiceProvider
, given the
vendor name and a version string.IllegalArgumentException
- if vendorName
or version
is null
.public IIOServiceProvider()
IIOServiceProvider
without
specifying a vendor name and a version string. The subclass
constructor should set the vendorName
and version
to non-null values.public void onRegistration(ServiceRegistry registry, Class<?> category)
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.onRegistration
in interface RegisterableService
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.public void onDeregistration(ServiceRegistry registry, Class<?> category)
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.onDeregistration
in interface RegisterableService
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.public String getVendorName()
public String getVersion()
public abstract String getDescription(Locale locale)
locale
- the locale for which the description string should
be localized.