org.apache.tuscany.sca.implementation.spring.xml
Class SpringXMLComponentTypeLoader

java.lang.Object
  extended by org.apache.tuscany.sca.implementation.spring.xml.SpringXMLComponentTypeLoader

public class SpringXMLComponentTypeLoader
extends java.lang.Object

Introspects a Spring XML application-context configuration file to create component type information.


Constructor Summary
SpringXMLComponentTypeLoader(AssemblyFactory assemblyFactory, JavaInterfaceFactory javaFactory, PolicyFactory policyFactory)
           
 
Method Summary
 Service createService(java.lang.Class<?> interfaze, java.lang.String name)
          Creates a Service for the component type based on its name and Java interface
protected  Resource getApplicationContextResource(java.lang.String locationAttr, java.lang.ClassLoader cl)
          Gets hold of the application-context.xml file as a Spring resource
protected  java.lang.Class<SpringImplementation> getImplementationClass()
           
 void load(SpringImplementation implementation)
          Base method which loads the component type from the application-context attached to the Spring implementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringXMLComponentTypeLoader

public SpringXMLComponentTypeLoader(AssemblyFactory assemblyFactory,
                                    JavaInterfaceFactory javaFactory,
                                    PolicyFactory policyFactory)
Method Detail

getImplementationClass

protected java.lang.Class<SpringImplementation> getImplementationClass()

load

public void load(SpringImplementation implementation)
          throws ContributionReadException
Base method which loads the component type from the application-context attached to the Spring implementation

Throws:
ContributionReadException

getApplicationContextResource

protected Resource getApplicationContextResource(java.lang.String locationAttr,
                                                 java.lang.ClassLoader cl)
                                          throws ContributionReadException
Gets hold of the application-context.xml file as a Spring resource

Parameters:
locationAttr - - the location attribute from the element
cl - - the ClassLoader for the Spring implementation
Throws:
ContributionReadException

createService

public Service createService(java.lang.Class<?> interfaze,
                             java.lang.String name)
                      throws InvalidInterfaceException
Creates a Service for the component type based on its name and Java interface

Throws:
InvalidInterfaceException