com.servingxml.ioc.resources
Class SimpleIocContainer
java.lang.Object
com.servingxml.ioc.resources.SimpleIocContainer
- All Implemented Interfaces:
- IocContainer, ResourceTable
public class SimpleIocContainer
- extends java.lang.Object
- implements IocContainer
The SimpleIocContainer
instance holds a collection of resource
objects indexed by name.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleIocContainer
public SimpleIocContainer(IocContainer parent)
SimpleIocContainer
public SimpleIocContainer(NameTable nameTable,
javax.xml.transform.sax.SAXTransformerFactory transformerFactory)
getNameTable
public MutableNameTable getNameTable()
- Specified by:
getNameTable
in interface IocContainer
lookupServiceComponent
public java.lang.Object lookupServiceComponent(java.lang.Class javaInterface,
java.lang.String uri)
- Description copied from interface:
IocContainer
- Looks up the service resource associated with the specified java interface and uri.
- Specified by:
lookupServiceComponent
in interface IocContainer
- Specified by:
lookupServiceComponent
in interface ResourceTable
- Parameters:
javaInterface
- the java interface that the component implements.uri
- the resource uri.
- Returns:
- A service resource if found, null otherwise.
lookupConfigurationComponent
public java.lang.Object lookupConfigurationComponent(java.lang.Class javaInterface)
- Description copied from interface:
IocContainer
- Looks up the configuration resource associated with the specified java interface.
- Specified by:
lookupConfigurationComponent
in interface IocContainer
- Specified by:
lookupConfigurationComponent
in interface ResourceTable
- Parameters:
javaInterface
- the java interface that the component implements.
- Returns:
- A configuration resource if found, null otherwise.
registerServiceComponent
public void registerServiceComponent(java.lang.Class javaInterface,
java.lang.String uri,
java.lang.Object value)
registerConfigurationComponent
public void registerConfigurationComponent(java.lang.Class javaInterface,
java.lang.Object value)
printDiagnostics
public void printDiagnostics(java.io.PrintStream ps)
- Specified by:
printDiagnostics
in interface IocContainer
getTransformerFactory
public javax.xml.transform.sax.SAXTransformerFactory getTransformerFactory()
- Specified by:
getTransformerFactory
in interface IocContainer
getUris
public java.lang.String[] getUris(java.lang.Class javaInterface)
- Specified by:
getUris
in interface IocContainer
putUris
public void putUris(java.lang.Class javaInterface,
java.util.List<java.lang.String> uriList)
- Specified by:
putUris
in interface IocContainer
getQnameContext
public QnameContext getQnameContext()
- Specified by:
getQnameContext
in interface IocContainer