|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StAXLoaderRegistry
Registry for XML loaders that can parse a StAX input stream and return model objects.
Loaders will typically be contributed to the system by any extension that needs to handle extension specific information contained in some XML configuration file. The loader can be contributed as a system component with an autowire reference to this registry which is used during initialization to actually register. This registry can also be used to parse an input stream, dispatching to the appropriate loader for each element accepted. Loaders can call back to the registry to load sub-elements that they are not able to handle directly.
Method Summary | ||
---|---|---|
org.apache.tuscany.model.assembly.AssemblyContext |
getContext()
Deprecated. |
|
org.apache.tuscany.model.assembly.AssemblyObject |
load(javax.xml.stream.XMLStreamReader reader,
LoaderContext loaderContext)
Parse the supplied XML stream dispatching to the appropriate registered loader for each element encountered in the stream. |
|
|
registerLoader(javax.xml.namespace.QName element,
StAXElementLoader<T> loader)
Register a loader. |
|
void |
setContext(org.apache.tuscany.model.assembly.AssemblyContext context)
Deprecated. |
|
|
unregisterLoader(javax.xml.namespace.QName element,
StAXElementLoader<T> loader)
Unregister a loader. |
Method Detail |
---|
<T extends org.apache.tuscany.model.assembly.AssemblyObject> void registerLoader(javax.xml.namespace.QName element, StAXElementLoader<T> loader)
element
- the element that should be delegated to the contibuted loaderloader
- a loader that is being contributed to the system<T extends org.apache.tuscany.model.assembly.AssemblyObject> void unregisterLoader(javax.xml.namespace.QName element, StAXElementLoader<T> loader)
element
- the element that was being delegated to the contibuted loaderloader
- a loader that should no longer be usedorg.apache.tuscany.model.assembly.AssemblyObject load(javax.xml.stream.XMLStreamReader reader, LoaderContext loaderContext) throws javax.xml.stream.XMLStreamException, ConfigurationLoadException
reader
- the XML stream to parseloaderContext
-
javax.xml.stream.XMLStreamException
- if there was a problem reading the stream
ConfigurationLoadException
@Deprecated org.apache.tuscany.model.assembly.AssemblyContext getContext()
@Deprecated void setContext(org.apache.tuscany.model.assembly.AssemblyContext context)
context
- the model context for this load operation
|
Tuscany Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |