public interface SourceResolver
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.| Modifier and Type | Field and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
static final java.lang.String ROLE
static final java.lang.String METHOD
SourceFactory) to support this or notstatic final java.lang.String URI_PARAMETERS
SourceFactory) to support this or not.static final java.lang.String URI_ENCODING
SourceFactory) to support this or not.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.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.void release(Source source)
source - the source to release.