|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourcesFactory
A ResourcesFactory
is a factory pattern interface for a
class that can create Resources
instances based on a logical
name that is passed to the factory. Repeated requests to return a
Resources
instance with the same
name should return the same
Resources
instance each time.
Implementations of ResourcesFactory
MUST
include a zero-arguments constructor so that instances of the factory
can be dynamically created. Therefore, configuration information
above and beyond the configuration String will generally be specified
via JavaBeans property setters on the
ResourcesFactory
implementation class.
ResourcesFactoryBase
,
JDBCResourcesFactory
,
PropertyResourcesFactory
,
ResourceBundleResourcesFactory
,
WebappResourcesFactoryBase
,
WebappPropertyResourcesFactory
,
WebappXMLResourcesFactory
,
XMLResourcesFactory
Method Summary | |
---|---|
Resources |
getResources(String name)
Create (if necessary) and return a Resources instance
for the specified logical name, with a default configuration. |
Resources |
getResources(String name,
String config)
Create (if necessary) and return a Resources instance
for the specified logical name, with a configuration based on
the specified configuration String. |
boolean |
isReturnNull()
Return the returnNull property value that will be
configured on Resources
instances created by this factory. |
void |
release()
Release any internal references to Resources instances
that have been returned previously, after calling the
destroy() method of each such instance. |
void |
setReturnNull(boolean returnNull)
Set the returnNull property value that will be configured on
Resources instances created by this
factory. |
Method Detail |
---|
boolean isReturnNull()
Return the returnNull
property value that will be
configured on Resources
instances created by this factory.
void setReturnNull(boolean returnNull)
Set the returnNull
property value that will be configured on
Resources
instances created by this
factory.
returnNull
- The new value to delegateResources getResources(String name)
Create (if necessary) and return a
Resources
instance
for the specified logical name, with a default configuration.
name
- Logical name of the
Resources
instance to
be returned
ResourcesException
- if a
Resources
instance
of the specified logical name cannot be returned.Resources getResources(String name, String config)
Create (if necessary) and return a
Resources
instance
for the specified logical name, with a configuration based on
the specified configuration String.
name
- Logical name of the
Resources
instance to be returnedconfig
- Configuration string for this resource (meaning
is dependent upon the ResourcesFactory
implementation being utilized), or null
for the default
configuration
ResourcesException
- if a
Resources
instance
of the specified logical name cannot be returned.void release()
Release any internal references to
Resources
instances
that have been returned previously, after calling the
destroy()
method of each such instance.
ResourcesException
- if an error occurs while releasing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |