org.mule.api.context
Interface ContainerContext

All Superinterfaces:
Disposable, Initialisable
All Known Implementing Classes:
AbstractContainerContext, JndiContainerContext, MuleContainerContext, MultiContainerContext, PropertiesContainerContext, RmiContainerContext

public interface ContainerContext
extends Initialisable, Disposable

ContainerContext defines the contract between Mule and an underlying container such as Spring or Pico.


Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Method Summary
 void configure(Reader configuration, String doctype, String encoding)
          This method will be called if there is a configuration fragement for the container to use to configure itself.
 Object getComponent(Object key)
          Queries a service from the underlying container
 String getName()
          Gets the identifying name of the container
 void setName(String name)
          The identifying name of the container.
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Method Detail

setName

void setName(String name)
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

Parameters:
name - the identifying name of the container

getName

String getName()
Gets the identifying name of the container

Returns:
the identifying name of the container

getComponent

Object getComponent(Object key)
                    throws ObjectNotFoundException
Queries a service from the underlying container

Parameters:
key - the key fo find the service with. Its up to the individual implementation to check the type of this key and look up objects accordingly
Returns:
The service found in the container
Throws:
ObjectNotFoundException - if the service is not found

configure

void configure(Reader configuration,
               String doctype,
               String encoding)
               throws ContainerException
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.

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


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.