| java.lang.Object javax.media.jai.FactoryCache
FactoryCache | class FactoryCache (Code) | | A class to manage the various instances of a descriptor factory.
This also manages preferences between factory instances for
a specified descriptor/product.
since: JAI 1.1 |
Method Summary | |
void | addFactory(String descriptorName, String productName, Object factoryInstance) Add a factory instance to this factory. | void | clearPreferences(String descriptorName, String productName) Removes all preferences set between factory
instances for a given descriptor and product. | List | getFactoryList(String descriptorName, String productName) Get a list of factory objects registered under the descriptor
and the product (in no particular order). | String | getLocalName(Object factoryInstance) | Object[][] | getPreferences(String descriptorName, String productName) Gets an iterator over all preferences set between factory
instances for a given descriptor and product. | Object | invoke(Object factoryInstance, Object[] parameterValues) Invoke the create method of the given factory instance
Parameters: factoryInstance - an instance of this factory Parameters: parameterValues - the parameterValues to be passed in to thethe create method. | void | removeFactory(String descriptorName, String productName, Object factoryInstance) | void | setPreference(String descriptorName, String productName, Object preferredOp, Object otherOp) Sets a preference between two factory instances for the given
operation and product. | void | unsetPreference(String descriptorName, String productName, Object preferredOp, Object otherOp) Unets a preference between two factory instances for the given
operation and product. |
arePreferencesSupported | final boolean arePreferencesSupported(Code) | | does the factory support preferences both among products
and among multiple instances of the factory within the
same product ?
|
factoryClass | final Class factoryClass(Code) | | The Class corresponding to the factory.
|
factoryMethod | final Method factoryMethod(Code) | | The name of the method in this factory used to
do a "create"
|
mode | final RegistryMode mode(Code) | | Cache the RegistryMode since it is bound to get used
many, many times.
|
FactoryCache | FactoryCache(String modeName)(Code) | | Constructor. Create a FactoryCache to hold factory objects
for a specific mode.
Parameters: modeName - the registry mode name. |
addFactory | void addFactory(String descriptorName, String productName, Object factoryInstance)(Code) | | Add a factory instance to this factory. If the factory has
NO preferences add it to a table hashed by just the operation name.
Otherwise add it to two tables, one hashed by a unique filename
(modeName + count) and the other hashed by the factory interface
name.
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs Parameters: factoryInstance - the factory instance |
clearPreferences | void clearPreferences(String descriptorName, String productName)(Code) | | Removes all preferences set between factory
instances for a given descriptor and product.
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs |
getFactoryList | List getFactoryList(String descriptorName, String productName)(Code) | | Get a list of factory objects registered under the descriptor
and the product (in no particular order).
|
getLocalName | String getLocalName(Object factoryInstance)(Code) | | Get the local name of a factoryInstance
|
getPreferences | Object[][] getPreferences(String descriptorName, String productName)(Code) | | Gets an iterator over all preferences set between factory
instances for a given descriptor and product.
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs |
removeFactory | void removeFactory(String descriptorName, String productName, Object factoryInstance)(Code) | | Remove a facory instance associated with the specified operation
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs Parameters: factoryInstance - the factory instance |
setPreference | void setPreference(String descriptorName, String productName, Object preferredOp, Object otherOp)(Code) | | Sets a preference between two factory instances for the given
operation and product.
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs Parameters: preferredOp - the preferred factory instance Parameters: otherOp - the not-so preferred/other factory instance |
unsetPreference | void unsetPreference(String descriptorName, String productName, Object preferredOp, Object otherOp)(Code) | | Unets a preference between two factory instances for the given
operation and product.
Parameters: descriptorName - operation that this factory instance implements Parameters: productName - product to which this factory instance belongs Parameters: preferredOp - the preferred factory instance Parameters: otherOp - the not-so preferred/other factory instance |
|
|