scs.core.builder
Class XMLComponentBuilder

java.lang.Object
  extended by scs.core.builder.XMLComponentBuilder

public final class XMLComponentBuilder
extends Object

The purpose of this class is to build components based entirely on an XML description. The XML file must comply to the official XSD.


Constructor Summary
XMLComponentBuilder(ORB orb, POA poa)
          Constructs a builder that uses XML as a description format to assembly a component.
 
Method Summary
 ComponentContext build(File file)
          Builds a component, based on an XML file.
 ComponentContext build(InputStream input)
          Builds a component, based on an XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLComponentBuilder

public XMLComponentBuilder(ORB orb,
                           POA poa)
                    throws SchemaNotFoundException,
                           InvalidSchemaException,
                           ParserConfigurationException
Constructs a builder that uses XML as a description format to assembly a component.

Parameters:
orb - The orb that shall be associated to this component and its CORBA objects.
poa - The poa that shall be used to activate and deactivate the servants.
Throws:
SchemaNotFoundException
InvalidSchemaException
ParserConfigurationException
Method Detail

build

public ComponentContext build(File file)
                       throws IOException,
                              SCSException
Builds a component, based on an XML file. The component will be composed of the basic facets, plus all facets and receptacles present on the XML file.

Parameters:
input - The XML file.
Returns:
A fully assembled component, with working facets, as described by the XML file.
Throws:
SCSException - If any error occurs. The exception will contain the more specific exception.
IOException

build

public ComponentContext build(InputStream input)
                       throws IOException,
                              SCSException
Builds a component, based on an XML file. The component will be composed of the basic facets, plus all facets and receptacles present on the XML file.

Parameters:
inputStream - .
Returns:
A fully assembled component, with working facets, as described by the XML file.
Throws:
IOException
SCSException - If any error occurs. The exception will contain the more specific exception.


Copyright © 2014. All Rights Reserved.