|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.OperationRegistry
A class responsible for maintaining a registry of various types of factory objects and preferences among them. The operation registry hierarchy looks as follows
|-object1- |-product1-|-object2- |-descriptor1-| |-object3- | | | | |-object1- | |-product2-|-object2- |-mode1-| |-object3- | | |-OperationRegistry-| | |-object1- | | |-product1-|-object2- | |-descriptor2-| |-object3- | | | | |-object1- | |-product2-|-object2- | |-object3- | |-mode2-|-descriptor1-|-object1-- | |-descriptor2-|-object1--
The OperationRegistry
class maps a descriptor name
(for example, an image operation name) into the particular kind of
factory object requested, capable of implementing the functionality
described by the descriptor. The mapping is constructed in several
stages:
At the highest level all objects are registered against some mode.
A mode is specified by a String
which must be one
of those returned by RegistryMode.getModeNames()
.
Examples of known registry modes include "rendered", "renderable",
"collection", "renderableCollection", "tileEncoder", "tileDecoder",
"remoteRendered", "remoteRenderable", etc.
Each registry mode is associated with a
RegistryElementDescriptor
which describes some functionality
to be implemented by factory objects associated with this
descriptor. For example, the "rendered" registry mode is associated
with OperationDescriptor.class
and "tileEncoder"
is associated with TileCodecDescriptor.class
.
Different registry modes can share the same
RegistryElementDescriptor
. For example "rendered", "renderable"
(and other image operation registry modes) are all associated with
OperationDescriptor.class
.
If a registry mode supports preferences (for example "rendered", "tileEncoder" etc.), then the hierarchy of objects registered under that mode looks like that of "mode1" above. Descriptors are first registered against all modes that the specific instance supports. Each factory object that implements the functionality specified by that descriptor is registered against some product (name) under that descriptor. Preferences can be set among products under a given descriptor or among objects under a specific product/descriptor.
The ordering of such factory objects is determined by the order
of the products attached to an OperationDescriptor
,
and by the order of the factory objects within each product. The
orders are established by setting pairwise preferences, resulting in
a partial order which is then sorted topologically. The results of
creating a cycle are undefined.
The ordering of factory objects within a product is intended to
allow vendors to create complex "fallback" chains. An example would
be installing a RenderedImageFactory
that implements
separable convolution ahead of a RenderedImageFactory
that implements a more general algorithm.
If a registry mode does not support preferences (for example, "renderable", "remoteRenderable" etc.) then the hierarchy of objects registered under that mode looks like that of "mode2" above. Only a single factory object belonging to this mode can be associated with a given descriptor. If multiple objects are registered under the same descriptor, the last one registered is retained.
The OperationRegistry
has several methods to manage this
hierarchy, which accept a modeName
and work with
Object
s. The preferred manner of usage is through the type-safe
wrapper class which are specific to each mode (for example
RIFRegistry
, CRIFRegistry
etc.)
Vendors are encouraged to use unique product names (by means of the Java programming language convention of reversed Internet addresses) in order to maximize the likelihood of clean installation. See The Java Programming Language, §10.1 for a discussion of this convention in the context of package naming.
Users will, for the most part, only wish to set ordering preferences on the product level, since the factory object level orderings will be complex. However, it is possible for a knowledgable user to insert a specific factory object into an existing product for tuning purposes.
The OperationRegistry
also has the responsibility
of associating a set of PropertyGenerators
with each descriptor. This set will be coalesced
into a PropertySource
suitable for
use by the getPropertySource() method. If several
PropertyGenerator
s associated with a particular
descriptor generate the same property, only the last one to be
registered will have any effect.
The registry handles all names (except class names) in a case-insensitive but retentive manner.
Initialization and automatic loading of registry objects.
The user has two options for automatic loading of registry objects.
registryFile.jai
" with entries for operators and preferences
specific to their packages. This registry file must be put it in
the META-INF directory of the jarfile or classpath.
OperationRegistrySpi
interface
and register it as service provider (see
OperationRegistrySpi
for more details). The updateRegistry
method of such registered service providers will be called
with the default OperationRegistry
of JAI
once it has been initialized.
The initialization of the OperationRegistry
of the default instance of JAI
happens as follows
META-INF/javax.media.jai.registryFile.jai
" (from jai_core.jar)
META-INF/registryFile.jai
" files found
in the classpath in some arbitrary order.
OperationRegistrySpi
listed in all "META-INF/services/javax.media.jai.OperationRegistrySpi
"
files found in the classpath and call their updateRegistry
method passing in the default OperationRegistry. The order of these
calls to updateRegistry
is arbitrary.
updateRegistry
method to be called right after the associated
registryFile.jai is read in, the following could be done.
The user could give the registry file a package qualified name
for e.g xxx.yyy.registryFile.jai and put this in the META-INF
directory of the jar file. Then in the concrete class that implements
OperationRegistrySpi
void updateRegistry(OperationRegistry or) { String registryFile = "META-INF/xxx.yyy.registryFile.jai"; InputStream is = ClassLoader.getResourceAsStream(registryFile); or.updateFromStream(is); // Make other changes to "or" ... }For information on the format of the registry file, see the serialized form of the
OperationRegistry
.
OperationRegistrySpi
,
RegistryMode
,
RegistryElementDescriptor
, Serialized FormConstructor Summary | |
OperationRegistry()
Default Constructor. |
Method Summary | |
void |
addPropertyGenerator(String operationName,
PropertyGenerator generator)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to addPropertyGenerator("rendered", ...) |
void |
addPropertyGenerator(String modeName,
String descriptorName,
PropertyGenerator generator)
Adds a PropertyGenerator to the registry,
associating it with a particular descriptor registered against a
registry mode. |
void |
clearCIFPreferences(String operationName,
String productName)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.clearPreferences(...)
. This is currently equivalent to
CIFRegistry.clearPreferences(this, operationName, productName) |
void |
clearFactoryPreferences(String modeName,
String descriptorName,
String productName)
Removes all preferences between instances of a factory within a product registered under a particular OperationDescriptor . |
void |
clearOperationPreferences(String operationName,
String productName)
Deprecated. as of JAI 1.1 in favor of calling
*IFRegistry.clearPreferences(..) on all image operation
related modes. |
void |
clearProductPreferences(String operationName)
Deprecated. as of JAI 1.1 in favor of clearProductPreferences(...)
which specifies a modeName also. This is
currently equivalent to
clearProductPreferences("rendered", operationName) |
void |
clearProductPreferences(String modeName,
String descriptorName)
Remove all the preferences between products for a descriptor registered under a registry mode. |
void |
clearPropertyState()
Deprecated. as of JAI 1.1 in factor of the version where the modeName is explicitly specified. This is currently equivalent to
clearPropertyState("rendered") |
void |
clearPropertyState(String modeName)
Removes all property associated information for this registry mode from this OperationRegistry . |
void |
clearRIFPreferences(String operationName,
String productName)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.clearPreferences(...)
. This is currently equivalent to
RIFRegistry.clearPreferences(this, operationName, productName) |
void |
copyPropertyFromSource(String operationName,
String propertyName,
int sourceIndex)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to copyPropertyFromSource("rendered", ...) |
void |
copyPropertyFromSource(String modeName,
String descriptorName,
String propertyName,
int sourceIndex)
Forces a property to be copied from the specified source by nodes performing a particular operation. |
PlanarImage |
create(String operationName,
ParameterBlock paramBlock,
RenderingHints renderHints)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.create(...)
which returns a RenderedImage and not a
PlanarImage . This is currently equivalent to
PlanarImage.wrapRenderedImage(RIFRegistry.create(this,
operationName, paramBlock, renderHints)) |
CollectionImage |
createCollection(String operationName,
ParameterBlock args,
RenderingHints hints)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.create(...)
. This is currently equivalent to
CIFRegistry.create(this, operationName, args, hints)) |
ContextualRenderedImageFactory |
createRenderable(String operationName,
ParameterBlock paramBlock)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.get(...)
This is currently equivalent to CRIFRegistry.get(this,
operationName) |
RegistryElementDescriptor |
getDescriptor(Class descriptorClass,
String descriptorName)
Get the RegistryElementDescriptor
corresponding to a descriptorClass
and a descriptorName . |
RegistryElementDescriptor |
getDescriptor(String modeName,
String descriptorName)
Get the RegistryElementDescriptor corresponding to
descriptorName which supports the specified mode. |
String[] |
getDescriptorNames(Class descriptorClass)
Get an array of all the descriptor names corresponding to the descriptorClass . |
String[] |
getDescriptorNames(String modeName)
Get an array of all descriptor-names of descriptors registered under a given registry mode. |
List |
getDescriptors(Class descriptorClass)
Get a List of all RegistryElementDescriptor
corresponding to the descriptorClass . |
List |
getDescriptors(String modeName)
Get a list of all RegistryElementDescriptor s registered
under a given registry mode. |
Object |
getFactory(String modeName,
String descriptorName)
Returns the factory of the specified type for the named operation. |
Iterator |
getFactoryIterator(String modeName,
String descriptorName)
Returns an Iterator over all factory objects
registered with the specified factory and operation names over
all products. |
Object[][] |
getFactoryPreferences(String modeName,
String descriptorName,
String productName)
Get all pairwise preferences between instances of a factory within a product registered under a particular OperationDescriptor . |
String[] |
getGeneratedPropertyNames(String operationName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to getGeneratedPropertyNames("rendered", ...) |
String[] |
getGeneratedPropertyNames(String modeName,
String descriptorName)
Returns a list of the properties generated by nodes implementing the descriptor associated with a particular descriptor Name. |
OperationDescriptor |
getOperationDescriptor(String operationName)
Deprecated. as of JAI 1.1 in favor of getDescriptor(...)
where the mode name is explicitly specified. |
Vector |
getOperationDescriptors()
Deprecated. as of JAI 1.1 in favor of getDescriptors(
OperationDescriptor.class) which returns a List and
not a Vector . This is currently equivalent to
new Vector(getDescriptors(OperationDescriptor.class)) |
String[] |
getOperationNames()
Deprecated. as of JAI 1.1 in favor of getDescriptorNames(
OperationDescriptor.class) . |
Vector |
getOrderedCIFList(String operationName,
String productName)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.getOrderedList(...)
which returns a List and not a
Vector . This is currently equivalent to
new Vector(CIFRegistry.getOrderedList(this, operationName,
productName)) |
List |
getOrderedFactoryList(String modeName,
String descriptorName,
String productName)
Returns a list of the factory instances of a product registered under a particular OperationDescriptor , in an
ordering that satisfies all of the pairwise preferences that
have been set. |
Vector |
getOrderedProductList(String operationName)
Deprecated. as of JAI 1.1 in favor of getOrderedProductList(...)
which accepts a modeName also. This is
currently equivalent to
getOrderedProductList("rendered", operationName) |
Vector |
getOrderedProductList(String modeName,
String descriptorName)
Returns a list of the products registered under a particular descriptor in an ordering that satisfies all of the pairwise preferences that have been set. |
Vector |
getOrderedRIFList(String operationName,
String productName)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.getOrderedList(...)
which returns a List and not a
Vector . This is currently equivalent to
new Vector(RIFRegistry.getOrderedList(this, operationName,
productName)) |
String[][] |
getProductPreferences(String operationName)
Deprecated. as of JAI 1.1 in favor of getProductPreferences(...)
which accepts a modeName also. This is
currently equivalent to
getProductPreferences("rendered", operationName) |
String[][] |
getProductPreferences(String modeName,
String descriptorName)
Returns a list of the pairwise product preferences under a particular descriptor registered against a registry mode. |
PropertySource |
getPropertySource(OperationNode op)
Constructs and returns a PropertySource suitable for
use by a given OperationNode . |
PropertySource |
getPropertySource(RenderableOp op)
Deprecated. as of JAI 1.1 in favor CRIFRegistry.getPropertySource(op) |
PropertySource |
getPropertySource(RenderedOp op)
Deprecated. as of JAI 1.1 in favor RIFRegistry.getPropertySource(op) |
PropertySource |
getPropertySource(String modeName,
String descriptorName,
Object op,
Vector sources)
Merge mode-specific property environment with mode-independent property environment of the descriptor. |
String[] |
getRegistryModes()
Get's the list of known registry modes known to the OperationRegistry . |
static OperationRegistry |
getThreadSafeOperationRegistry()
Creates and returns a new thread-safe version of the OperationRegistry which uses reader-writer locks to
wrap every method with a read or a write lock as appropriate. |
void |
initializeFromStream(InputStream in)
Initializes the OperationRegistry from an
InputStream . |
Object |
invokeFactory(String modeName,
String descriptorName,
Object[] args)
Finds the factory of the specified type for the named operation and invokes its default factory method with the supplied parameters. |
void |
readExternal(ObjectInput in)
Restores the contents of the registry from an ObjectInput which was previously written using the writeExternal
method. |
void |
registerCIF(String operationName,
String productName,
CollectionImageFactory CIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.register(...)
. This is currently equivalent to
CIFRegistry.register(this, operationName, productName, CIF) |
void |
registerCRIF(String operationName,
ContextualRenderedImageFactory CRIF)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.register(...)
. This is currently equivalent to
CRIFRegistry.register(this, operationName, productName, CRIF) |
void |
registerDescriptor(RegistryElementDescriptor descriptor)
Register a descriptor against all the registry modes it supports. |
void |
registerFactory(String modeName,
String descriptorName,
String productName,
Object factory)
Register a factory object with a particular product and descriptor against a specified mode. |
void |
registerOperationDescriptor(OperationDescriptor odesc,
String operationName)
Deprecated. as of JAI 1.1 in favor of registerDescriptor(odesc) |
void |
registerRIF(String operationName,
String productName,
RenderedImageFactory RIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.register(...)
. This is currently equivalent to
RIFRegistry.register(this, operationName, productName, RIF) |
void |
registerServices(ClassLoader cl)
Load all the "META-INF/registryFile.jai" files and then called the updateRegistry() of the registered
service provider of OperationRegistrySpi found
in the classpath corresponding to this class loader. |
void |
removePropertyGenerator(String operationName,
PropertyGenerator generator)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to removePropertyGenerator("rendered", ...) |
void |
removePropertyGenerator(String modeName,
String descriptorName,
PropertyGenerator generator)
Removes a PropertyGenerator from its association
with a particular descriptor/registry-mode in the registry. |
void |
removeRegistryMode(String modeName)
Remove a registry mode (including pre-defined JAI modes) from the OperationRegistry. |
void |
setCIFPreference(String operationName,
String productName,
CollectionImageFactory preferredCIF,
CollectionImageFactory otherCIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.setPreference(...)
. This is currently equivalent to
CIFRegistry.setPreference(this, operationName, productName,
preferredCIF, otherCIF) |
void |
setFactoryPreference(String modeName,
String descriptorName,
String productName,
Object preferredOp,
Object otherOp)
Sets a preference between two factory instances for a given operation under a specified product. |
void |
setProductPreference(String operationName,
String preferredProductName,
String otherProductName)
Deprecated. as of JAI 1.1 in favor of setProductPreference(...)
which specifies a modeName also. This is
currently equivalent to setProductPreference("rendered",
operationName, preferredProductName, otherProductName) |
void |
setProductPreference(String modeName,
String descriptorName,
String preferredProductName,
String otherProductName)
Set the preference between two products for a descriptor registered under a registry mode. |
void |
setRIFPreference(String operationName,
String productName,
RenderedImageFactory preferredRIF,
RenderedImageFactory otherRIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.setPreference(...)
. This is currently equivalent to
RIFRegistry.setPreference(this, operationName, productName,
preferredRIF, otherRIF) |
void |
suppressAllProperties(String operationName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressAllProperties("rendered", ...) |
void |
suppressAllProperties(String modeName,
String descriptorName)
Forces all properties to be suppressed by nodes performing a particular operation. |
void |
suppressProperty(String operationName,
String propertyName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressProperty("rendered", ...) |
void |
suppressProperty(String modeName,
String descriptorName,
String propertyName)
Forces a particular property to be suppressed by nodes performing a particular operation. |
String |
toString()
Returns a String representation of the registry. |
void |
unregisterCIF(String operationName,
String productName,
CollectionImageFactory CIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.unregister(...)
. This is currently equivalent to
CIFRegistry.unregister(this, operationName, productName, CIF) |
void |
unregisterCRIF(String operationName,
ContextualRenderedImageFactory CRIF)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.unregister(...)
. This is currently equivalent to
CRIFRegistry.unregister(this, operationName, productName, CRIF) |
void |
unregisterDescriptor(RegistryElementDescriptor descriptor)
Unregister a descriptor against all its supported modes from the operation registry. |
void |
unregisterFactory(String modeName,
String descriptorName,
String productName,
Object factory)
Unregister a factory object previously registered with a product and descriptor against the specified mode. |
void |
unregisterOperationDescriptor(String operationName)
Deprecated. as of JAI 1.1 in favor of unregisterDescriptor(...)
which accepts an OperationDescriptor
and not a operationName . |
void |
unregisterRIF(String operationName,
String productName,
RenderedImageFactory RIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.unregister(...)
. This is currently equivalent to
RIFRegistry.unregister(this, operationName, productName, RIF) |
void |
unsetCIFPreference(String operationName,
String productName,
CollectionImageFactory preferredCIF,
CollectionImageFactory otherCIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.unsetPreference(...)
. This is currently equivalent to
CIFRegistry.unsetPreference(this, operationName, productName,
preferredCIF, otherCIF) |
void |
unsetFactoryPreference(String modeName,
String descriptorName,
String productName,
Object preferredOp,
Object otherOp)
Unsets a preference between two factory instances for a given operation under a specified product. |
void |
unsetProductPreference(String operationName,
String preferredProductName,
String otherProductName)
Deprecated. as of JAI 1.1 in favor of unsetProductPreference(...)
which specifies a modeName also. This is
currently equivalent to unsetProductPreference("rendered",
operationName, preferredProductName, otherProductName) |
void |
unsetProductPreference(String modeName,
String descriptorName,
String preferredProductName,
String otherProductName)
Remove the preference between two products for a descriptor registered under a registry mode. |
void |
unsetRIFPreference(String operationName,
String productName,
RenderedImageFactory preferredRIF,
RenderedImageFactory otherRIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.unsetPreference(...)
. This is currently equivalent to
RIFRegistry.unsetPreference(this, operationName, productName,
preferredRIF, otherRIF) |
void |
updateFromStream(InputStream in)
Updates the current OperationRegistry with the
operations specified by the given InputStream . |
void |
writeExternal(ObjectOutput out)
Saves the contents of the registry as described in the serialized form. |
void |
writeToStream(OutputStream out)
Writes out the contents of the OperationRegistry to
a stream as specified in the writeExternal method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OperationRegistry()
OperationRegistry
created is
not thread-safe. Note that none of the automatic loading
of registry files or services happens here.getThreadSafeOperationRegistry()
Method Detail |
public static OperationRegistry getThreadSafeOperationRegistry()
OperationRegistry
which uses reader-writer locks to
wrap every method with a read or a write lock as appropriate.
Note that none of the automatic loading of registry files or
services is done on this OperationRegistry
.public String toString()
toString
in class Object
OperationRegistry
.public void writeToStream(OutputStream out) throws IOException
OperationRegistry
to
a stream as specified in the writeExternal
method.
For more information see the
serialized form.out
- The OutputStream to which the OperationRegistry
state is written.IllegalArgumentException
- if out is null.writeExternal(java.io.ObjectOutput)
public void initializeFromStream(InputStream in) throws IOException
OperationRegistry
from an
InputStream
. All non-IO exceptions encountered while
parsing the registry files are caught and their error messages are
redirected to System.err
. If System.err
is null the error messages will never be seen.
The InputStream
passed in will not be closed by
this method, the caller should close the InputStream
when it is no longer needed.
The format of the data from the InputStream
is
expected to be the same as that of the writeExternal
method as specified in the
serialized form.
in
- The InputStream
from which to read the data.IllegalArgumentException
- if in is null.writeExternal(java.io.ObjectOutput)
public void updateFromStream(InputStream in) throws IOException
OperationRegistry
with the
operations specified by the given InputStream
.
All non-IO exceptions encountered while parsing the registry
files are caught and their error messages are redirected to
System.err
. If System.err
is null the
error messages will never be seen.
The InputStream
passed in will not be closed by
this method, the caller should close the InputStream
when it is no longer needed.
The format of the data from the InputStream
is
expected to be the same as that of the writeExternal
method as specified in the
serialized form.
in
- The InputStream
from which to read the data.IllegalArgumentException
- if in is null.writeExternal(java.io.ObjectOutput)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
writeExternal
method.
All non-IO exceptions encountered while parsing the registry
files are caught and their error messages are redirected to
System.err
. If System.err
is null the
error messages will never be seen.
readExternal
in interface Externalizable
in
- An ObjectInput from which to read the data.IllegalArgumentException
- if in is null.writeExternal(java.io.ObjectOutput)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- An ObjectOutput to which to write the data.IllegalArgumentException
- if out is null.public void removeRegistryMode(String modeName)
RegistryMode
Also note that a registry mode need not be explicitly added to
the OperationRegistry
. All modes registered under
RegistryMode
are automatically recognized by the
OperationRegistry
.IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
public String[] getRegistryModes()
OperationRegistry
. This might not be all
modes listed in RegistryMode.getModeNames()
.public void registerDescriptor(RegistryElementDescriptor descriptor)
descriptor
- an instance of a concrete sub-class of
RegistryElementDescriptor
IllegalArgumentException
- is descriptor is null
IllegalArgumentException
- if any of the modes returned
by descriptor.getSupportedModes()
is not one
of those returned by RegistryMode.getModes()
IllegalArgumentException
- if another descriptor with the
same name has already been registered against any of the
modes supported by this descriptor.public void unregisterDescriptor(RegistryElementDescriptor descriptor)
descriptor
- an instance of a concrete sub-class of
RegistryElementDescriptor
IllegalArgumentException
- is descriptor is null
IllegalArgumentException
- if any of the modes returned
by descriptor.getSupportedModes()
is not one
of those returned by RegistryMode.getModes()
IllegalArgumentException
- if any of the
PropertyGenerator
s associated with the
RegistryElementDescriptor
to be unregistered is null.public RegistryElementDescriptor getDescriptor(Class descriptorClass, String descriptorName)
RegistryElementDescriptor
corresponding to a descriptorClass
and a descriptorName
. For example,
getDescriptor(OperationDescriptor.class, "add")
would get the operation descriptor for the "add" image operation.
Note that different descriptors might have been registered
against each mode associated with the descriptorClass. In this
case this methods will arbitrarily return the first descriptor
it encounters with a matching descriptorName and descriptorClass.descriptorClass
- the descriptor Class
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if descriptorClass
is
null
or if the descriptorClass
is
not associated with any of the modes returned
RegistryMode.getModes()
IllegalArgumentException
- if descriptorName is null
public List getDescriptors(Class descriptorClass)
List
of all RegistryElementDescriptor
corresponding to the descriptorClass
. For example,
getDescriptors(OperationDescriptor.class)
would get a list of all image operation descriptors.descriptorClass
- the descriptor Class
IllegalArgumentException
- if descriptorClass
is
null
or if the descriptorClass
is
not associated with any of the modes returned
RegistryMode.getModes()
public String[] getDescriptorNames(Class descriptorClass)
descriptorClass
. For example,
getDescriptorNames(OperationDescriptor.class)
would get an array of all image operation descriptor names.descriptorClass
- the descriptor Class
IllegalArgumentException
- if descriptorClass
is
null
or if the descriptorClass
is
not associated with any of the modes returned
RegistryMode.getModes()
public RegistryElementDescriptor getDescriptor(String modeName, String descriptorName)
RegistryElementDescriptor
corresponding to
descriptorName
which supports the specified mode.
This is done by matching up the descriptorName
against RegistryElementDescriptor.getName
in a
case-insensitive manner. This returns null
if there
no RegistryElementDescriptor
corresponding to
descriptorName
that supports the specified mode.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
IllegalArgumentException
- if descriptorName is null
public List getDescriptors(String modeName)
RegistryElementDescriptor
s registered
under a given registry mode.modeName
- the registry mode name as a String
IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
public String[] getDescriptorNames(String modeName)
modeName
- the registry mode name as a String
IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
public void setProductPreference(String modeName, String descriptorName, String preferredProductName, String otherProductName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
preferredProductName
- the product to be preferred.otherProductName
- the other product.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if the registry mode does not
support preferencesIllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
under modeName
.IllegalArgumentException
- if either of the products are
not registered against descriptorName
under productName
.public void unsetProductPreference(String modeName, String descriptorName, String preferredProductName, String otherProductName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
preferredProductName
- the product formerly preferred.otherProductName
- the other product.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if the registry mode does not
support preferencesIllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
under modeName
.IllegalArgumentException
- if either of the products are
not registered against descriptorName
under productName
.public void clearProductPreferences(String modeName, String descriptorName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
IllegalArgumentException
- if descriptorName is null
IllegalArgumentException
- if the registry mode does not
support preferencespublic String[][] getProductPreferences(String modeName, String descriptorName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
IllegalArgumentException
- if descriptorName is null
IllegalArgumentException
- if the registry mode does not
support preferencespublic Vector getOrderedProductList(String modeName, String descriptorName)
null
if
cycles exist. Returns null if no descriptor has been registered
under this descriptorName, or if no products exist for this
operation.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
Vector
of Strings representing product names.IllegalArgumentException
- if modeName is null
or if the modeName is not one of the modes returned
RegistryMode.getModes()
IllegalArgumentException
- if descriptorName is null
IllegalArgumentException
- if the registry mode does not
support preferencespublic void registerFactory(String modeName, String descriptorName, String productName, Object factory)
null
)modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
factory
- the object to be registered.IllegalArgumentException
- if any of the arguments
is null
(productName can be null
for modes that do not support preferences).IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public void unregisterFactory(String modeName, String descriptorName, String productName, Object factory)
null
)modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
factory
- the object to be unregistered.IllegalArgumentException
- if any of the arguments
is null
(productName can be null
for modes that do not support preferences).IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the factory object was not previously
registered against descriptorName and productNamepublic void setFactoryPreference(String modeName, String descriptorName, String productName, Object preferredOp, Object otherOp)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
preferredOp
- the preferred factory objectotherOp
- the other factory objectIllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if either of the factory objects
were not previously registered against
descriptorName and productNameIllegalArgumentException
- if the registry mode does not
support preferencespublic void unsetFactoryPreference(String modeName, String descriptorName, String productName, Object preferredOp, Object otherOp)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
preferredOp
- the factory object formerly preferredotherOp
- the other factory objectIllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if either of the factory objects
were not previously registered against
descriptorName and productNameIllegalArgumentException
- if the registry mode does not
support preferencespublic void clearFactoryPreferences(String modeName, String descriptorName, String productName)
OperationDescriptor
.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public Object[][] getFactoryPreferences(String modeName, String descriptorName, String productName)
OperationDescriptor
.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public List getOrderedFactoryList(String modeName, String descriptorName, String productName)
OperationDescriptor
, in an
ordering that satisfies all of the pairwise preferences that
have been set. Returns null
if cycles exist.
Returns null
, if the product does not exist under
this descriptorName.
If the particular registry mode does not support preferences then the
returned List
will contain a single factory.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
productName
- the product name as a String
List
of factory instancesIllegalArgumentException
- if any of the arguments
is null
(productName can be null
for modes that do not support preferences).IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public Iterator getFactoryIterator(String modeName, String descriptorName)
Iterator
over all factory objects
registered with the specified factory and operation names over
all products. The order of objects in the iteration will be
according to the pairwise preferences among products and image
factories within a product. The remove()
method
of the Iterator
may not be implemented. If the
particular factory does not have preferences then the returned
Iterator
will traverse a collection containing the
single factory.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
Iterator
over factory objectsIllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public Object getFactory(String modeName, String descriptorName)
Iterator
returned by the
getFactoryIterator()
method.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public Object invokeFactory(String modeName, String descriptorName, Object[] args)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if modeName or descriptorName
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
public void addPropertyGenerator(String modeName, String descriptorName, PropertyGenerator generator)
PropertyGenerator
to the registry,
associating it with a particular descriptor registered against a
registry mode.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
generator
- the PropertyGenerator
to be added.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public void removePropertyGenerator(String modeName, String descriptorName, PropertyGenerator generator)
PropertyGenerator
from its association
with a particular descriptor/registry-mode in the registry. If
the generator was not associated with the operation, nothing
happens.modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
generator
- the PropertyGenerator
to be removed.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public void copyPropertyFromSource(String modeName, String descriptorName, String propertyName, int sourceIndex)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
propertyName
- the name of the property to be copied.sourceIndex
- the index of the source to copy the property from.IllegalArgumentException
- if any of the String
arguments is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public void suppressProperty(String modeName, String descriptorName, String propertyName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
propertyName
- the name of the property to be suppressed.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public void suppressAllProperties(String modeName, String descriptorName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public void clearPropertyState(String modeName)
OperationRegistry
.modeName
- the registry mode name as a String
IllegalArgumentException
- if modeName is null or is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if the specified mode does not
support properties.public String[] getGeneratedPropertyNames(String modeName, String descriptorName)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public PropertySource getPropertySource(String modeName, String descriptorName, Object op, Vector sources)
modeName
- the registry mode name as a String
descriptorName
- the descriptor name as a String
op
- the Object
from which properties will
be generated.sources
- the PropertySource
s corresponding to
the sources of the object representing the named descriptor
in the indicated mode. The supplied Vector
may
be empty to indicate that there are no sources.PropertySource
which encapsulates
the global property environment for the object representing
the named descriptor in the indicated mode.IllegalArgumentException
- if any of the arguments
is null
IllegalArgumentException
- if modeName is not one of
those returned by RegistryMode.getModes()
IllegalArgumentException
- if there is no
RegistryElementDescriptor
registered against
the descriptorName
IllegalArgumentException
- if the specified mode does not
support properties.public PropertySource getPropertySource(OperationNode op)
PropertySource
suitable for
use by a given OperationNode
. The
PropertySource
includes properties copied from prior
nodes as well as those generated at the node itself. Additionally,
property suppression is taken into account. The actual
implementation of getPropertySource()
may make use
of deferred execution and caching.op
- the OperationNode
requesting its
PropertySource
.IllegalArgumentException
- if op is null.public void registerServices(ClassLoader cl) throws IOException
updateRegistry()
of the registered
service provider of OperationRegistrySpi
found
in the classpath corresponding to this class loader. All
non-IO exceptions encountered while parsing the registry
files are caught and their error messages are redirected to
System.err
. If System.err
is null the
error messages will never be seen.
This is a convenience method to do automatic detection in runtime loaded jar files
Note that the JAI does not keep track of which JAR files have
their registry files loaded and/or services initialized. Hence
if registerServices
is called twice with the
same ClassLoader, the loading of the registry files and/or
initialization of the services will happen twice.
public void registerOperationDescriptor(OperationDescriptor odesc, String operationName)
registerDescriptor(odesc)
OperationDescriptor
with the registry. Each
operation must have an OperationDescriptor
before
registerRIF() may be called to add RIFs to the operation.odesc
- an OperationDescriptor
containing information
about the operation.operationName
- the operation name as a String.registerDescriptor - for list of exceptions thrown.
public void unregisterOperationDescriptor(String operationName)
unregisterDescriptor(...)
which accepts an OperationDescriptor
and not a operationName
.
OperationDescriptor
from the registry.operationName
- the operation name as a String.unregisterDescriptor - for list of exceptions thrown.
public OperationDescriptor getOperationDescriptor(String operationName)
getDescriptor(...)
where the mode name is explicitly specified.
OperationDescriptor
that is currently
registered under the given name, or null if none exists.
Though unlikely, it is possible to have different descriptors
registered under different modes. In this case this will
arbitrarily return the first operation descriptor found.operationName
- the String to be queried.OperationDescriptor
.IllegalArgumentException
- if operationName is null.getDescriptor(Class, String)
public Vector getOperationDescriptors()
getDescriptors(
OperationDescriptor.class)
which returns a List
and
not a Vector
. This is currently equivalent to
new Vector(getDescriptors(OperationDescriptor.class))
OperationDescriptor
s.OperationDescriptor
s.getDescriptors(Class)
public String[] getOperationNames()
getDescriptorNames(
OperationDescriptor.class)
.
OperationDescriptor
s in the registry are registered.getDescriptorNames(Class)
public void registerRIF(String operationName, String productName, RenderedImageFactory RIF)
RIFRegistry.register(...)
. This is currently equivalent to
RIFRegistry.register(this, operationName, productName, RIF)
operationName
- the operation name as a String.productName
- the product name, as a String.RIF
- the RenderedImageFactory
to be registered.registerFactory - for list of exceptions thrown.
,
RIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory)
public void unregisterRIF(String operationName, String productName, RenderedImageFactory RIF)
RIFRegistry.unregister(...)
. This is currently equivalent to
RIFRegistry.unregister(this, operationName, productName, RIF)
operationName
- the operation name as a String.productName
- the product name, as a String.RIF
- the RenderedImageFactory
to be unregistered.unregisterFactory - for list of exceptions thrown.
,
RIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory)
public void registerCRIF(String operationName, ContextualRenderedImageFactory CRIF)
CRIFRegistry.register(...)
. This is currently equivalent to
CRIFRegistry.register(this, operationName, productName, CRIF)
operationName
- the operation name as a String.CRIF
- the ContextualRenderedImageFactory
to be
registered.registerFactory - for list of exceptions thrown.
,
CRIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ContextualRenderedImageFactory)
public void unregisterCRIF(String operationName, ContextualRenderedImageFactory CRIF)
CRIFRegistry.unregister(...)
. This is currently equivalent to
CRIFRegistry.unregister(this, operationName, productName, CRIF)
operationName
- the operation name as a String.CRIF
- the ContextualRenderedImageFactory
to be
unregistered.unregisterFactory - for list of exceptions thrown.
,
CRIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ContextualRenderedImageFactory)
public void registerCIF(String operationName, String productName, CollectionImageFactory CIF)
CIFRegistry.register(...)
. This is currently equivalent to
CIFRegistry.register(this, operationName, productName, CIF)
operationName
- the operation name as a String.productName
- the product name, as a String.CIF
- the CollectionImageFactory
to be registered.registerFactory - for list of exceptions thrown.
,
CIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory)
public void unregisterCIF(String operationName, String productName, CollectionImageFactory CIF)
CIFRegistry.unregister(...)
. This is currently equivalent to
CIFRegistry.unregister(this, operationName, productName, CIF)
operationName
- the operation name as a String.productName
- the product name, as a String.CIF
- the CollectionImageFactory
to be unregistered.unregisterFactory - for list of exceptions thrown.
,
CIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory)
public void setProductPreference(String operationName, String preferredProductName, String otherProductName)
setProductPreference(...)
which specifies a modeName
also. This is
currently equivalent to setProductPreference("rendered",
operationName, preferredProductName, otherProductName)
OperationDescriptor
. Any attempt to set a preference
between a product and itself will be ignored.operationName
- the operation name as a String.preferredProductName
- the product to be preferred.otherProductName
- the other product.setProductPreference - for list of exceptions thrown.
public void unsetProductPreference(String operationName, String preferredProductName, String otherProductName)
unsetProductPreference(...)
which specifies a modeName
also. This is
currently equivalent to unsetProductPreference("rendered",
operationName, preferredProductName, otherProductName)
OperationDescriptor
.operationName
- the operation name as a String.preferredProductName
- the product formerly preferred.otherProductName
- the other product.unsetProductPreference - for list of exceptions thrown.
public void clearProductPreferences(String operationName)
clearProductPreferences(...)
which specifies a modeName
also. This is
currently equivalent to
clearProductPreferences("rendered", operationName)
OperationDescriptor
.operationName
- the operation name as a String.clearProductPreferences - for list of exceptions thrown.
public String[][] getProductPreferences(String operationName)
getProductPreferences(...)
which accepts a modeName
also. This is
currently equivalent to
getProductPreferences("rendered", operationName)
OperationDescriptor
. If no product
preferences have been set, returns null.operationName
- the operation name as a String.getProductPreferences - for list of exceptions thrown.
public Vector getOrderedProductList(String operationName)
getOrderedProductList(...)
which accepts a modeName
also. This is
currently equivalent to
getOrderedProductList("rendered", operationName)
OperationDescriptor
, in an ordering that satisfies
all of the pairwise preferences that have been set. Returns
null
if cycles exist. Returns null
if
no OperationDescriptor
has been registered under
this operationName, or if no products exist for this operation.operationName
- the operation name as a String.getOrderedProductList - for list of exceptions thrown.
public void setRIFPreference(String operationName, String productName, RenderedImageFactory preferredRIF, RenderedImageFactory otherRIF)
RIFRegistry.setPreference(...)
. This is currently equivalent to
RIFRegistry.setPreference(this, operationName, productName,
preferredRIF, otherRIF)
operationName
- the operation name as a String.productName
- the name of the product.preferredRIF
- the preferred RenderedImageFactory
.otherRIF
- the other RenderedImageFactory
.setFactoryPreference - for list of exceptions thrown.
,
RIFRegistry.setPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory, java.awt.image.renderable.RenderedImageFactory)
public void setCIFPreference(String operationName, String productName, CollectionImageFactory preferredCIF, CollectionImageFactory otherCIF)
CIFRegistry.setPreference(...)
. This is currently equivalent to
CIFRegistry.setPreference(this, operationName, productName,
preferredCIF, otherCIF)
operationName
- the operation name as a String.productName
- the name of the product.preferredCIF
- the preferred CollectionRenderedImageFactory.otherCIF
- the other CollectionRenderedImageFactory.setFactoryPreference - for list of exceptions thrown.
,
CIFRegistry.setPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory, javax.media.jai.CollectionImageFactory)
public void unsetRIFPreference(String operationName, String productName, RenderedImageFactory preferredRIF, RenderedImageFactory otherRIF)
RIFRegistry.unsetPreference(...)
. This is currently equivalent to
RIFRegistry.unsetPreference(this, operationName, productName,
preferredRIF, otherRIF)
operationName
- the operation name as a String.productName
- the name of the product.preferredRIF
- the formerly preferred
RenderedImageFactory
.otherRIF
- the other RenderedImageFactory
.unsetFactoryPreference - for list of exceptions thrown.
,
RIFRegistry.unsetPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory, java.awt.image.renderable.RenderedImageFactory)
public void unsetCIFPreference(String operationName, String productName, CollectionImageFactory preferredCIF, CollectionImageFactory otherCIF)
CIFRegistry.unsetPreference(...)
. This is currently equivalent to
CIFRegistry.unsetPreference(this, operationName, productName,
preferredCIF, otherCIF)
operationName
- the operation name as a String.productName
- the name of the product.preferredCIF
- the formerly preferred
CollectionImageFactory
.otherCIF
- the other CollectionImageFactory
.unsetFactoryPreference - for list of exceptions thrown.
,
CIFRegistry.unsetPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory, javax.media.jai.CollectionImageFactory)
public void clearRIFPreferences(String operationName, String productName)
RIFRegistry.clearPreferences(...)
. This is currently equivalent to
RIFRegistry.clearPreferences(this, operationName, productName)
OperationDescriptor
.operationName
- the operation name as a String.productName
- the name of the product.clearFactoryPreferences - for list of exceptions thrown.
,
RIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
public void clearCIFPreferences(String operationName, String productName)
CIFRegistry.clearPreferences(...)
. This is currently equivalent to
CIFRegistry.clearPreferences(this, operationName, productName)
OperationDescriptor
.operationName
- the operation name as a String.productName
- the name of the product.clearFactoryPreferences - for list of exceptions thrown.
,
CIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
public void clearOperationPreferences(String operationName, String productName)
*IFRegistry.clearPreferences(..)
on all image operation
related modes.
OperationDescriptor
.operationName
- the operation name as a String.productName
- the name of the product.clearFactoryPreferences - for list of exceptions thrown.
,
RIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
,
CIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
public Vector getOrderedRIFList(String operationName, String productName)
RIFRegistry.getOrderedList(...)
which returns a List
and not a
Vector
. This is currently equivalent to
new Vector(RIFRegistry.getOrderedList(this, operationName,
productName))
OperationDescriptor
, in an ordering
that satisfies all of the pairwise preferences that have
been set. Returns null
if cycles exist. Returns
null
, if the product does not exist under this
operationName.operationName
- the operation name as a String.productName
- the name of the product.getOrderedFactoryList - for list of exceptions thrown.
,
RIFRegistry.getOrderedList(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
public Vector getOrderedCIFList(String operationName, String productName)
CIFRegistry.getOrderedList(...)
which returns a List
and not a
Vector
. This is currently equivalent to
new Vector(CIFRegistry.getOrderedList(this, operationName,
productName))
OperationDescriptor
, in an ordering
that satisfies all of the pairwise preferences that have
been set. Returns null
if cycles exist. Returns
null
, if the product does not exist under this
operationName.operationName
- the operation name as a String.productName
- the name of the product.getOrderedFactoryList - for list of exceptions thrown.
,
CIFRegistry.getOrderedList(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)
public PlanarImage create(String operationName, ParameterBlock paramBlock, RenderingHints renderHints)
RIFRegistry.create(...)
which returns a RenderedImage
and not a
PlanarImage
. This is currently equivalent to
PlanarImage.wrapRenderedImage(RIFRegistry.create(this,
operationName, paramBlock, renderHints))
RenderedOp
) representing
the results of applying a given operation to a particular
ParameterBlock and rendering hints. The registry is used to
determine the RIF to be used to instantiate the operation.
If none of the RIFs registered with this
OperationRegistry
returns a non-null value, null is
returned. Exceptions thrown by the RIFs will be caught by this
method and will not be propagated.
operationName
- the operation name as a String.paramBlock
- the operation's ParameterBlock.renderHints
- a RenderingHints object containing rendering hints.IllegalArgumentException
- if operationName is null.RIFRegistry.create(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)
public ContextualRenderedImageFactory createRenderable(String operationName, ParameterBlock paramBlock)
CRIFRegistry.get(...)
This is currently equivalent to CRIFRegistry.get(this,
operationName)
operationName
- the operation name as a String.paramBlock
- the operation's ParameterBlock.IllegalArgumentException
- if operationName is null.CRIFRegistry.get(javax.media.jai.OperationRegistry, java.lang.String)
public CollectionImage createCollection(String operationName, ParameterBlock args, RenderingHints hints)
CIFRegistry.create(...)
. This is currently equivalent to
CIFRegistry.create(this, operationName, args, hints))
CollectionImage
(usually a
CollectionOp
) representing the results of applying
a given operation to a particular ParameterBlock and rendering hints.
The registry is used to determine the CIF to be used to instantiate
the operation.
If none of the CIFs registered with this
OperationRegistry
returns a non-null value, null is
returned. Exceptions thrown by the CIFs will be caught by this
method and will not be propagated.
operationName
- The operation name as a String.args
- The operation's input parameters.hints
- A RenderingHints object containing rendering hints.IllegalArgumentException
- if operationName is null.CIFRegistry.create(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)
public void clearPropertyState()
clearPropertyState("rendered")
OperationRegistry
.clearPropertyState(java.lang.String)
public void addPropertyGenerator(String operationName, PropertyGenerator generator)
addPropertyGenerator("rendered", ...)
PropertyGenerator
to the registry, associating
it with a particular OperationDescriptor
.operationName
- the operation name as a String.generator
- the PropertyGenerator
to be added.addPropertyGenerator - for list of exceptions thrown.
public void removePropertyGenerator(String operationName, PropertyGenerator generator)
removePropertyGenerator("rendered", ...)
PropertyGenerator
from its association with a
particular OperationDescriptor
in the registry. If
the generator was not associated with the operation,
nothing happens.operationName
- the operation name as a String.generator
- the PropertyGenerator
to be removed.removePropertyGenerator - for list of exceptions thrown.
public void suppressProperty(String operationName, String propertyName)
suppressProperty("rendered", ...)
operationName
- the operation name as a String.propertyName
- the name of the property to be suppressed.suppressProperty - for list of exceptions thrown.
public void suppressAllProperties(String operationName)
suppressAllProperties("rendered", ...)
operationName
- the operation name as a String.suppressAllProperties - for list of exceptions thrown.
public void copyPropertyFromSource(String operationName, String propertyName, int sourceIndex)
copyPropertyFromSource("rendered", ...)
RenderedOp
nodes performing a particular
operation. By default, a property is copied from the first
source node that emits it. The result of specifying an invalid
source is undefined.operationName
- the operation name as a String.propertyName
- the name of the property to be copied.sourceIndex
- the index of the source to copy the property from.copyPropertyFromSource - for list of exceptions thrown.
public String[] getGeneratedPropertyNames(String operationName)
getGeneratedPropertyNames("rendered", ...)
operationName
- the operation name as a String.getGeneratedPropertyNames - for list of exceptions thrown.
public PropertySource getPropertySource(RenderedOp op)
RIFRegistry.getPropertySource(op)
PropertySource
suitable for
use by a given RenderedOp
. The
PropertySource
includes properties copied from prior
nodes as well as those generated at the node itself. Additionally,
property suppression is taken into account. The actual
implementation of getPropertySource()
may make use
of deferred execution and caching.op
- the RenderedOp
requesting its
PropertySource
.#getPropertySource - for list of exceptions thrown.
public PropertySource getPropertySource(RenderableOp op)
CRIFRegistry.getPropertySource(op)
PropertySource
suitable for
use by a given RenderableOp
. The
PropertySource
includes properties copied from prior
nodes as well as those generated at the node itself. Additionally,
property suppression is taken into account. The actual implementation
of getPropertySource()
may make use of deferred
execution and caching.op
- the RenderableOp
requesting its
PropertySource
.CRIFRegistry.getPropertySource(javax.media.jai.RenderableOp)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |