org.mule.impl.container
Class MultiContainerContext

java.lang.Object
  extended byorg.mule.impl.container.MultiContainerContext
All Implemented Interfaces:
Disposable, Initialisable, UMOContainerContext

public class MultiContainerContext
extends java.lang.Object
implements UMOContainerContext

MultiContainerContext is a container that hosts other containers from which components are queried.

Version:
$Revision: 1.2 $
Author:
Ross Mason

Field Summary
protected static Log logger
          logger used by this class
 
Constructor Summary
MultiContainerContext()
           
 
Method Summary
 void addContainer(UMOContainerContext container)
           
 void configure(java.io.Reader configuration, java.lang.String doctype, java.lang.String encoding)
          This method will be called if there is a configuration fragement for the container to use to configure itself.
 void dispose()
          A lifecycle method where implementor should fee up any resources If an exception is thrown it should just be logged and processing should continue.
 java.lang.Object getComponent(java.lang.Object key)
          Queries a component from the underlying container
 java.lang.String getName()
          Gets the identifying name of the container
 void initialise()
          Method used to perform any initialisation work.
 UMOContainerContext removeContainer(java.lang.String name)
           
 void setName(java.lang.String name)
          The identifying name of the container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static transient Log logger
logger used by this class

Constructor Detail

MultiContainerContext

public MultiContainerContext()
Method Detail

setName

public void setName(java.lang.String name)
Description copied from interface: UMOContainerContext
The identifying name of the container. Note that implementations should provide a default name that users can choose to override The name can be used to reference a container when more than one is registered

Specified by:
setName in interface UMOContainerContext
Parameters:
name - the identifying name of the container

getName

public java.lang.String getName()
Description copied from interface: UMOContainerContext
Gets the identifying name of the container

Specified by:
getName in interface UMOContainerContext
Returns:
the identifying name of the container

addContainer

public void addContainer(UMOContainerContext container)

removeContainer

public UMOContainerContext removeContainer(java.lang.String name)

getComponent

public java.lang.Object getComponent(java.lang.Object key)
                              throws ObjectNotFoundException
Description copied from interface: UMOContainerContext
Queries a component from the underlying container

Specified by:
getComponent in interface UMOContainerContext
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

configure

public void configure(java.io.Reader configuration,
                      java.lang.String doctype,
                      java.lang.String encoding)
               throws ContainerException
Description copied from interface: UMOContainerContext
This method will be called if there is a configuration fragement for the container to use to configure itself. In Mule Xml the fragment is Xml that is embedded in the <configuration> element of the <container-context$gt; element.

Specified by:
configure in interface UMOContainerContext
Parameters:
configuration -
doctype - the doctype declaration to use for the configuration fragment. can be null if no validation is to be performed or the fragment is not Xml
encoding - the encoding to use in the Xml declaration. Default is UTF-8
Throws:
ContainerException

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should fee up any resources If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions

Specified by:
dispose in interface Disposable

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
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.