org.openxml.source
Interface HolderFactory
- public abstract interface HolderFactory
Interface for factory for creating document holders. Holder classes are used to
provide access to documents through various protocols and storages locations
(HTTP, file, JAR, etc), and to support document caching. The factory locates
and creates an holder based on the supplied document source.
A number of factories are registered by default. Additional factories may be
defined by the application by implementing newHolder(org.openxml.source.Source)
,
and registered with HolderFinder.registerFactory(org.openxml.source.HolderFactory)
. The factories are
queried in the reverse order they were registered, giving precedence to
factories registered by the application over the built-in.
If a registered factory is capable of handling a specific protocol or storage
locations, it returns a new Holder
object that encapsulates that source.
The document is then accessible through Holder.getReadOnly()
and Holder.newInstance()
.
- Version:
- $Revision: 1.4 $ $Date: 1999/02/20 02:19:00 $
- Author:
- Assaf Arkin
- See Also:
Holder
,
Source
newHolder
public Holder newHolder(Source source)
throws java.io.IOException
- Abstract method implemented by factory class. Given a document source,
if the factory can handle sources of this protocol or storage location,
it should create and return a new
Holder
object. Otherwise,
it should return null allowing some other holder to provide access.
- Parameters:
source
- The document source- Returns:
- A new holder, or null
- Throws:
- java.io.IOException - This exception is ignored