|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLogEnabled | +--org.apache.avalon.excalibur.source.SourceResolverImpl
Base interface for resolving a source by system identifiers.
Instead of using the java.net.URL classes which prevent you
to add 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 ComponentManager
and releasing them.
It looks for the base URL in the Context
object with
the "container.rootDir" entry. If the entry does not exist, it is
populated with the system property "user.dir".
Field Summary | |
protected java.net.URL |
m_baseURL
The base URL |
protected org.apache.avalon.framework.context.Context |
m_context
The context |
protected org.apache.avalon.framework.component.ComponentSelector |
m_factorySelector
The special Source factories |
protected org.apache.avalon.framework.component.ComponentManager |
m_manager
The component manager |
Fields inherited from interface org.apache.avalon.excalibur.source.SourceResolver |
ROLE |
Constructor Summary | |
SourceResolverImpl()
|
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Set the current ComponentManager instance used by this
Composable . |
void |
contextualize(org.apache.avalon.framework.context.Context context)
Get the context |
void |
dispose()
Dispose |
void |
release(Source source)
Releases a resolved resource |
Source |
resolve(java.lang.String location)
Get a Source object. |
Source |
resolve(java.lang.String location,
SourceParameters parameters)
Get a Source object. |
Source |
resolve(java.net.URL base,
java.lang.String location)
Get a Source object. |
Source |
resolve(java.net.URL base,
java.lang.String location,
SourceParameters parameters)
Get a Source object. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.avalon.framework.component.ComponentManager m_manager
protected org.apache.avalon.framework.component.ComponentSelector m_factorySelector
protected org.apache.avalon.framework.context.Context m_context
protected java.net.URL m_baseURL
Constructor Detail |
public SourceResolverImpl()
Method Detail |
public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
public void compose(org.apache.avalon.framework.component.ComponentManager manager) throws org.apache.avalon.framework.component.ComponentException
ComponentManager
instance used by this
Composable
.compose
in interface org.apache.avalon.framework.component.Composable
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
public Source resolve(java.lang.String location) throws java.net.MalformedURLException, java.io.IOException, org.apache.avalon.framework.component.ComponentException
Source
object.resolve
in interface SourceResolver
public Source resolve(java.lang.String location, SourceParameters parameters) throws java.net.MalformedURLException, java.io.IOException, org.apache.avalon.framework.component.ComponentException
Source
object.resolve
in interface SourceResolver
public Source resolve(java.net.URL base, java.lang.String location) throws java.net.MalformedURLException, java.io.IOException, org.apache.avalon.framework.component.ComponentException
Source
object.resolve
in interface SourceResolver
public Source resolve(java.net.URL base, java.lang.String location, SourceParameters parameters) throws java.net.MalformedURLException, java.io.IOException, org.apache.avalon.framework.component.ComponentException
Source
object.resolve
in interface SourceResolver
public void release(Source source)
release
in interface SourceResolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |