Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.servingxml.ioc.resources
Class IocContainerFactory

    java.lang.Object
      com.servingxml.ioc.resources.IocContainerFactory

    public class IocContainerFactory

extends java.lang.Object

A `IocContainerFactory` class creates instances of `IocContainer`, e.g.

     IocContainerFactory iocContainerFactory = new IocContainerFactory();
     iocContainerFactory.loadComponentDefinitions();

     IocContainer resources =
        iocContainerFactory.createIocContainer(configUrl,
                                               parameters);
     resources = iocContainerFactory.createIocContainer(
                     resourcesUrl, parameters, resources);

IocContainer objects encapsulate ServingXML resources scripts.

A Java application can load any number of resources scripts (mapping files), one, two, or more. In the example, configUrl and resourcesUrl are both URLs that identify the location of resources scripts. They can be absolute URLs, or relative to an entry in the classpath. By convention, the resources in the script identified by configUrl perform configuration (e.g. configure the default XSLT processor), for an example, refer to the servingxml.xml configuration file which is used by the servingxml console app.

Note that the scripts are chained together.

Nested Class Summary
`class` | `IocContainerFactory.RegisterComponentCommand`

Constructor Summary
`IocContainerFactory()`

Method Summary
`IocContainer` | `createIocContainer(org.w3c.dom.Document resourcesDocument, Record parameters)` Creates an IocContainer from a DOM `Document`.
`IocContainer` | `createIocContainer(org.w3c.dom.Document resourcesDocument, Record parameters, IocContainer parent)` Creates an IocContainer from a DOM `Document` and a parent IocContainer.
`IocContainer` | `createIocContainer(org.w3c.dom.Document resourcesDocument, java.lang.String baseId, Record parameters)` Creates an IocContainer from a DOM `Document`.
`IocContainer` | `createIocContainer(org.w3c.dom.Document resourcesDocument, java.lang.String baseId, Record parameters, IocContainer parent)` Creates an IocContainer from a DOM `Document` and a parent IocContainer.
`IocContainer` | `createIocContainer(org.xml.sax.InputSource is, java.lang.String baseId, Record parameters)` Creates an IocContainer from an InputSource.
`IocContainer` | `createIocContainer(org.xml.sax.InputSource is, java.lang.String baseId, Record parameters, IocContainer parent)` Creates an IocContainer from an InputSource and a parent IocContainer.
`IocContainer` | `createIocContainer(java.io.InputStream is, Record parameters)` Creates an IocContainer from an InputStream.
`IocContainer` | `createIocContainer(java.io.InputStream is, Record parameters, IocContainer parent)` Creates an IocContainer from an InputStream and a parent IocContainer.
`IocContainer` | `createIocContainer(java.io.InputStream is, java.lang.String baseId, Record parameters)` Creates an IocContainer from an InputStream.
`IocContainer` | `createIocContainer(java.io.InputStream is, java.lang.String baseId, Record parameters, IocContainer parent)` Creates an IocContainer from an InputStream and a parent IocContainer.
`IocContainer` | `createIocContainer(java.io.Reader reader, Record parameters)` Creates an IocContainer from a Reader.
`IocContainer` | `createIocContainer(java.io.Reader reader, Record parameters, IocContainer parent)` Creates an IocContainer from a Reader and a parent IocContainer.
`IocContainer` | `createIocContainer(java.io.Reader reader, java.lang.String baseId, Record parameters)` Creates an IocContainer from an InputStream.
`IocContainer` | `createIocContainer(java.io.Reader reader, java.lang.String baseId, Record parameters, IocContainer parent)` Creates an IocContainer from a Reader and a parent IocContainer.
`IocContainer` | `createIocContainer(java.lang.String systemId)` Deprecated.
`IocContainer` | `createIocContainer(java.lang.String systemId, IocContainer parent)` Deprecated.
`IocContainer` | `createIocContainer(java.lang.String systemId, Record parameters)` Creates an IocContainer from a URL.
`IocContainer` | `createIocContainer(java.lang.String systemId, Record parameters, IocContainer parent)` Creates an IocContainer from a URL and a parent IocContainer.
`ComponentDictionary` | `getComponentDictionary()`
`MutableNameTable` | `getNameTable()`
`void` | `load(java.lang.String manifestKey)`
`void` | `load(java.net.URL[] componentDefinitionUrls)`
`void` | `loadComponentDefinitions()` Loads component defintions from metadata in the component jar files found in the classpath.
`void` | `loadComponentDefinitions(java.lang.String[] componentDefinitionUrls)` Loads component defintions from the supplied list of URL's for component.xml files.
`void` | `loadComponentDefinitions(java.net.URL[] componentDefinitionUrls)` Loads component defintions from the supplied list of URL's for component.xml files.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### IocContainerFactory

    public IocContainerFactory()

Method Detail

### getComponentDictionary

    public ComponentDictionary getComponentDictionary()

### getNameTable

    public MutableNameTable getNameTable()

### loadComponentDefinitions

    public void loadComponentDefinitions()

  Loads component defintions from metadata in the component jar files found in the classpath.

### load

    public void load(java.lang.String manifestKey)

### loadComponentDefinitions

    public void loadComponentDefinitions(java.net.URL[] componentDefinitionUrls)

  Loads component defintions from the supplied list of URL's for component.xml files. You can use this version of `loadComponentDefinitions` in J2EE containers such as WebLogic that isolate the class loader.

  Parameters:
    `componentDefinitionUrls` - An array of URL objects

### load

    public void load(java.net.URL[] componentDefinitionUrls)

### loadComponentDefinitions

    public void loadComponentDefinitions(java.lang.String[] componentDefinitionUrls)

  Loads component defintions from the supplied list of URL's for component.xml files. You can use this version of `loadComponentDefinitions` in J2EE containers such as WebLogic that isolate the class loader.

  Parameters:
    `componentDefinitionUrls` - An array of Strings representing URLs.

### createIocContainer

    @Deprecated
    public IocContainer createIocContainer(java.lang.String systemId)

  Deprecated.

### createIocContainer

    public IocContainer createIocContainer(java.lang.String systemId,
                                           Record parameters)

  Creates an IocContainer from a URL.

  Parameters:
    `systemId` - The URL.
    `parameters` - Configuartion parameters.

### createIocContainer

    @Deprecated
    public IocContainer createIocContainer(java.lang.String systemId,
                                                      IocContainer parent)

  Deprecated.

### createIocContainer

    public IocContainer createIocContainer(java.lang.String systemId,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from a URL and a parent IocContainer.

  Parameters:
    `systemId` - The URL.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(org.w3c.dom.Document resourcesDocument,
                                           Record parameters)

  Creates an IocContainer from a DOM `Document`.

  Parameters:
    `resourcesDocument` - The Document.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(org.w3c.dom.Document resourcesDocument,
                                           java.lang.String baseId,
                                           Record parameters)

  Creates an IocContainer from a DOM `Document`.

  Parameters:
    `resourcesDocument` - The Document.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(org.w3c.dom.Document resourcesDocument,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from a DOM `Document` and a parent IocContainer.

  Parameters:
    `resourcesDocument` - The Document.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(org.w3c.dom.Document resourcesDocument,
                                           java.lang.String baseId,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from a DOM `Document` and a parent IocContainer.

  Parameters:
    `resourcesDocument` - The Document.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(java.io.InputStream is,
                                           Record parameters)

  Creates an IocContainer from an InputStream.

  Parameters:
    `is` - The InputStream.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(java.io.InputStream is,
                                           java.lang.String baseId,
                                           Record parameters)

  Creates an IocContainer from an InputStream.

  Parameters:
    `is` - The InputStream.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(java.io.InputStream is,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from an InputStream and a parent IocContainer.

  Parameters:
    `is` - The InputStream.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(java.io.InputStream is,
                                           java.lang.String baseId,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from an InputStream and a parent IocContainer.

  Parameters:
    `is` - The InputStream.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(java.io.Reader reader,
                                           Record parameters)

  Creates an IocContainer from a Reader.

  Parameters:
    `reader` - The Reader.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(java.io.Reader reader,
                                           java.lang.String baseId,
                                           Record parameters)

  Creates an IocContainer from an InputStream.

  Parameters:
    `reader` - The Reader.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(org.xml.sax.InputSource is,
                                           java.lang.String baseId,
                                           Record parameters)

  Creates an IocContainer from an InputSource.

  Parameters:
    `is` - The InputSource.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.

### createIocContainer

    public IocContainer createIocContainer(java.io.Reader reader,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from a Reader and a parent IocContainer.

  Parameters:
    `reader` - The Reader.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(java.io.Reader reader,
                                           java.lang.String baseId,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from a Reader and a parent IocContainer.

  Parameters:
    `reader` - The Reader.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

### createIocContainer

    public IocContainer createIocContainer(org.xml.sax.InputSource is,
                                           java.lang.String baseId,
                                           Record parameters,
                                           IocContainer parent)

  Creates an IocContainer from an InputSource and a parent IocContainer.

  Parameters:
    `is` - The InputSource.
    `baseId` - A base URI against which relative URIs in the document are resolved.
    `parameters` - Configuartion parameters.
    `parent` - The parent IocContainer.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD