net.trajano.twiff.container
Interface ContainerBuilder


public interface ContainerBuilder

Implementors of this interface will be called when populating PicoContainers with components. Methods would generally look like:

container.registerComponentImplementation(SomeObject.class);

The use of this method was prefered over nanocontainer's approach of using external scripting languages for flexibility. Using this method allows for stricter compile time checks.

NOTE: do not register the following classes or implementors into the containers as they are used by the system:

Author:
Archimedes Trajano

Method Summary
 void buildApplicationLevelContainer(MutablePicoContainer container)
          This method registers components in the application level.
 void buildRequestLevelContainer(MutablePicoContainer container)
          This method registers components per request.
 void buildSessionLevelContainer(MutablePicoContainer container)
          This method registers components in the session level.
 

Method Detail

buildApplicationLevelContainer

void buildApplicationLevelContainer(MutablePicoContainer container)
This method registers components in the application level. Namely the ServletContext. Please note that there one ServletContext created for every virtual machine so ensure that components for this container are not meant to be shared.

Parameters:
container - the container to populate.

buildRequestLevelContainer

void buildRequestLevelContainer(MutablePicoContainer container)
This method registers components per request. Though creating the container may be quick, since PicoContainers are quite small, you should avoid putting too much things in here as well.

Parameters:
container - the container to populate.

buildSessionLevelContainer

void buildSessionLevelContainer(MutablePicoContainer container)
This method registers components in the session level. Namely the HttpSession. This is created once per session, but it is replicated across all nodes in a cluster so do not make this too big.

Parameters:
container - the container to populate.


Copyright © 2004-2005 trajano.net. All Rights Reserved.