Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.extension
Class LoaderExtension<T extends ModelObject>

java.lang.Object
  extended by org.apache.tuscany.spi.extension.LoaderExtension<T>
All Implemented Interfaces:
StAXElementLoader<T>

public abstract class LoaderExtension<T extends ModelObject>
extends Object
implements StAXElementLoader<T>

Support class for extending the Loader mechanism.

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

Field Summary
protected  LoaderRegistry registry
          The LoaderRegistry that this loader should register with; usually set by injection.
 
Constructor Summary
protected LoaderExtension(LoaderRegistry registry)
          Constructor specifies the registry to register with.
 
Method Summary
abstract  QName getXMLType()
          Returns the QName of the element that this implementation handles.
 void start()
          Initialize the loader.
 void stop()
          Destroy the loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.spi.loader.StAXElementLoader
load
 

Field Detail

registry

protected LoaderRegistry registry
The LoaderRegistry that this loader should register with; usually set by injection. This registry may also be used to load sub-elements.

Constructor Detail

LoaderExtension

protected LoaderExtension(LoaderRegistry registry)
Constructor specifies the registry to register with.

Parameters:
registry - the LoaderRegistry this loader should register with
Method Detail

start

public void start()
Initialize the loader. The base implementation registers this loader with the registry as a handler for the XML type returned by getXMLType(). Implementations may override this to register the loader as a handler for multiple XML types.


stop

public void stop()
Destroy the loader. The base implementation unregisters the loader from the regsitry based on the type returned by getXMLType().


getXMLType

public abstract QName getXMLType()
Returns the QName of the element that this implementation handles.

Returns:
the QName of the element that this implementation handles

Apache Tuscany SCA Kernel Sub-Project

-