|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Base interface for resolving a source by system identifiers.
Instead of using the java.net.URL classes which prevent you
from adding your own custom protocols in a server environment,
you should use this resolver for all URLs.
The resolver creates for each source a Source
object, which could then be asked for an InputStream
etc.
When the Source
object is no longer needed
it must be released using the resolver. This is very similar like
looking up components from a ComponentLocator
.
In fact a source object can implement most lifecycle interfaces
like Composable, Initializable, Disposable etc.
Field Summary | |
static java.lang.String |
METHOD
With this parameter you can specify the method to use for getting the content. |
static java.lang.String |
ROLE
|
static java.lang.String |
URI_ENCODING
With this parameter you can specify the encoding to use for encoding the additional request parameters the URI. |
static java.lang.String |
URI_PARAMETERS
With this parameter you can specify additional request parameters which are appended to the URI. |
Method Summary | |
void |
release(Source source)
Releases a resolved resource. |
Source |
resolveURI(java.lang.String location)
Get a Source object. |
Source |
resolveURI(java.lang.String location,
java.lang.String base,
java.util.Map parameters)
Get a Source object. |
Field Detail |
public static final java.lang.String ROLE
public static final java.lang.String METHOD
SourceFactory
) to support this or not
public static final java.lang.String URI_PARAMETERS
SourceFactory
) to support this or not.
public static final java.lang.String URI_ENCODING
SourceFactory
) to support this or not.
Method Detail |
public Source resolveURI(java.lang.String location) throws java.net.MalformedURLException, java.io.IOException
Source
object. This is a shortcut for (String, String, Map)
.
java.net.MalformedURLException
- if location
is malformed.
java.io.IOException
- if the source couldn't be created for some other reason.public Source resolveURI(java.lang.String location, java.lang.String base, java.util.Map parameters) throws java.net.MalformedURLException, java.io.IOException
Source
object.
location
- - the URI to resolve. If this is relative it is either
resolved relative to the base parameter (if not null)
or relative to a base setting of the source resolver
itself.base
- - a base URI for resolving relative locations. This
is optional and can be null
.parameters
- - Additional parameters for the URI. The parameters
are specific to the used scheme.
java.net.MalformedURLException
- if location
is malformed.
java.io.IOException
- if the source couldn't be created for some other reason.public void release(Source source)
source
- the source to release.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |