org.mule.extras.picocontainer
Class PicoContainerContext
java.lang.Object
org.mule.impl.container.AbstractContainerContext
org.mule.extras.picocontainer.PicoContainerContext
- All Implemented Interfaces:
- Disposable, Initialisable, UMOContainerContext
- public class PicoContainerContext
- extends AbstractContainerContext
PicoContainerContext
is a Pico Context that can expose pico-managed
components for use in the Mule framework.
- Version:
- $Revision: 1.5 $
- Author:
- Antonio Lopez, Ross Mason
Field Summary |
static java.lang.String |
CONFIGEXTENSION
|
protected java.lang.String |
configFile
The url of the config file to use |
Method Summary |
void |
configure(java.io.Reader configuration)
|
protected void |
doConfigure(java.io.Reader configReader,
java.lang.String builderClassName)
|
java.lang.Object |
getComponent(java.lang.Object key)
Queries a component from the underlying container |
MutablePicoContainer |
getContainer()
|
java.lang.String |
getExtension()
|
void |
initialise()
Method used to perform any initialisation work. |
void |
setConfigFile(java.lang.String configFile)
The config file can be a resource on the classpath on a file system. |
void |
setContainer(MutablePicoContainer container)
|
void |
setExtension(java.lang.String extension)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONFIGEXTENSION
public static final java.lang.String CONFIGEXTENSION
- See Also:
- Constant Field Values
configFile
protected java.lang.String configFile
- The url of the config file to use
PicoContainerContext
public PicoContainerContext()
getExtension
public java.lang.String getExtension()
setExtension
public void setExtension(java.lang.String extension)
getComponent
public java.lang.Object getComponent(java.lang.Object key)
throws ObjectNotFoundException
- Description copied from interface:
UMOContainerContext
- Queries a component from the underlying container
- Parameters:
key
- the key fo find the component with. Its up to the
individual implementation to check the type of this key and
look up objects accordingly
- Returns:
- The component found in the container
- Throws:
ObjectNotFoundException
- if the component is not found
getContainer
public MutablePicoContainer getContainer()
- Returns:
- Returns the container.
setContainer
public void setContainer(MutablePicoContainer container)
- Parameters:
container
- The container to set.
setConfigFile
public void setConfigFile(java.lang.String configFile)
throws PicoCompositionException
- The config file can be a resource on the classpath on a file system.
- Parameters:
configFile
- The configFile to set.
- Throws:
PicoCompositionException
configure
public void configure(java.io.Reader configuration)
throws ContainerException
- Specified by:
configure
in class AbstractContainerContext
- Throws:
ContainerException
doConfigure
protected void doConfigure(java.io.Reader configReader,
java.lang.String builderClassName)
throws ContainerException
- Throws:
ContainerException
initialise
public void initialise()
throws InitialisationException,
RecoverableException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal
error occurs during initialisation an
InitialisationException
should be thrown, causing the Mule instance to shutdown. If the error is
recoverable, say by retrying to connect, a RecoverableException
should be thrown. There is no guarantee that by throwing a Recoverable exception
that the Mule instance will not shut down.
- Specified by:
initialise
in interface Initialisable
- Overrides:
initialise
in class AbstractContainerContext
- Throws:
InitialisationException
RecoverableException
Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.