org.sca4j.introspection.xml
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: 3025 $ $Date: 2008-03-07 10:10:43 +0000 (Fri, 07 Mar 2008) $

Method Summary
 void registerLoader(javax.xml.namespace.QName element, TypeLoader<?> loader)
          Register a loader.
 void unregisterLoader(javax.xml.namespace.QName element)
          Unregister the loader for the supplied element.
 
Methods inherited from interface org.sca4j.introspection.xml.Loader
load, load
 

Method Detail

registerLoader

void registerLoader(javax.xml.namespace.QName element,
                    TypeLoader<?> loader)
                    throws java.lang.IllegalStateException
Register a loader. This operation will typically be called by a loader during its initialization.

Parameters:
element - the name of the XML global element that this loader can handle
loader - a loader that is being contributed to the system
Throws:
java.lang.IllegalStateException - if there is already a loader registered for the supplied element

unregisterLoader

void unregisterLoader(javax.xml.namespace.QName element)
Unregister the loader for the supplied element. This will typically be called by a loader as it is being destroyed. This method simply returns if no loader is registered for that element.

Parameters:
element - the element whose loader should be unregistered


Copyright © 2008-2011 Service Symphony. All Rights Reserved.