|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A source factory creates new source objects.
Source factories are used to extend the source resolving mechanism
with new URI schemes. A new source factory is added in order to
handle a specific prototol. The SourceResolver
delegates
the handling of a URI containing this new scheme to the factory,
and the factory can create a corresponding Source
object.
Field Summary | |
static java.lang.String |
ROLE
|
Method Summary | |
Source |
getSource(java.lang.String location,
java.util.Map parameters)
Get a Source object. |
void |
release(Source source)
Release a Source object. |
Field Detail |
public static final java.lang.String ROLE
Method Detail |
public Source getSource(java.lang.String location, java.util.Map parameters) throws java.io.IOException, java.net.MalformedURLException
Source
object.
The factory creates a new Source
object that can be used
by the application. However, when this source object is not needed
anymore it has to be released again using the release(Source)
method. This is achieved by using SourceResolver.release(Source)
which
finds the appropriate SourceFactory
.
location
- The URI to resolve - this URI includes the scheme.parameters
- additionnal named parameters (optionnal and can be null
)
that drive the creation of the Source
object. Each implementation
must specify what parameters it accepts.
java.io.IOException
- if the source couldn't be created for some reason.
java.net.MalformedURLException
public void release(Source source)
Source
object.
source
- the source to release.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |