Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.loader
Interface LoaderRegistry

All Superinterfaces:
Loader

public interface LoaderRegistry
extends Loader

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 builderRegistry which is used during initialization to actually register.

This builderRegistry can also be used to parse an input stream, dispatching to the appropriate loader for each element accepted. Loaders can call back to the builderRegistry to load sub-elements that they are not able to handle directly.

Version:
$Rev: 430937 $ $Date: 2006-08-11 18:17:56 -0700 (Fri, 11 Aug 2006) $

Method Summary
<I extends Implementation<?>>
void
registerLoader(Class<I> key, ComponentTypeLoader<I> loader)
          Regsiter a component type loader.
<T extends ModelObject>
void
registerLoader(QName element, StAXElementLoader<T> loader)
          Register a loader.
<I extends Implementation<?>>
void
unregisterLoader(Class<I> key)
          Unregister a component type loader form the system.
<T extends ModelObject>
void
unregisterLoader(QName element, StAXElementLoader<T> loader)
          Unregister a loader.
 
Methods inherited from interface org.apache.tuscany.spi.loader.Loader
load, load, loadComponentType
 

Method Detail

registerLoader

<T extends ModelObject> void registerLoader(QName element,
                                            StAXElementLoader<T> loader)
Register a loader. This operation will typically be called by a loader during its initialization.

Parameters:
element - the element that should be delegated to the contibuted loader
loader - a loader that is being contributed to the system

unregisterLoader

<T extends ModelObject> void unregisterLoader(QName element,
                                              StAXElementLoader<T> loader)
Unregister a loader. This will typically be called by a loader as it is being destroyed.

Parameters:
element - the element that was being delegated to the contibuted loader
loader - a loader that should no longer be used

registerLoader

<I extends Implementation<?>> void registerLoader(Class<I> key,
                                                  ComponentTypeLoader<I> loader)
Regsiter a component type loader.

Parameters:
key - a type of implementation this loader can load component types for
loader - the loader that is being contributed to the system

unregisterLoader

<I extends Implementation<?>> void unregisterLoader(Class<I> key)
Unregister a component type loader form the system.

Parameters:
key - a type of implementation whose loader should be unregistered

Apache Tuscany SCA Kernel Sub-Project

-