| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 Summary | |
---|---|
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 | |
---|---|
Constructs a blank IIOServiceProvider .
|
|
IIOServiceProvider(String vendorName, String version) Constructs an IIOServiceProvider with a given
vendor name and version identifier.
|
Method Summary | |
---|---|
abstract String |
getDescription(Locale locale) Returns a brief, human-readable description of this service provider and its associated implementation. |
String |
Returns the name of the vendor responsible for creating this service provider and its associated implementation. |
String |
Returns a string describing the version number of this service provider and its associated implementation. |
void |
onDeregistration(ServiceRegistry registry, Class category) A callback that will be whenever the Spi class has been deregistered from a ServiceRegistry .
|
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 .
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String vendorName
String
to be returned from
getVendorName
, initially null
.
Constructors should set this to a non-null
value.
protected String version
String
to be returned from
getVersion
, initially null. Constructors should
set this to a non-null
value.
Constructor Detail |
---|
public IIOServiceProvider()
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.
public IIOServiceProvider(String vendorName, String version)
IIOServiceProvider
with a given
vendor name and version identifier.
vendorName
- the vendor name.version
- a version identifier.Method Detail |
---|
public abstract String getDescription(Locale locale)
Locale
, if possible.
locale
- a Locale
for which the return value
should be localized.String
containing a description of this
service provider.public String getVendorName()
The default implementation returns the value of the
vendorName
instance variable.
null
String
containing
the name of the vendor.public String getVersion()
The default implementation returns the value of the
version
instance variable.
null
String
containing
the version of this service provider.public void onDeregistration(ServiceRegistry registry, Class category)
ServiceRegistry
.
Only the registry should call this method.
The default implementation does nothing.
registry
category
public void onRegistration(ServiceRegistry registry, Class category)
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.
registry
category
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |