org.jtheque.core.managers.beans.ioc
Class SpringContainer

java.lang.Object
  extended by org.jtheque.core.managers.beans.ioc.SpringContainer
All Implemented Interfaces:
IocContainer

public final class SpringContainer
extends java.lang.Object
implements IocContainer

The spring context. This class is responsible for the Spring Application Context.

Author:
Baptiste Wicht

Constructor Summary
SpringContainer()
          Construct a new SpringContainer.
 
Method Summary
 void addBeansFile(java.lang.String file)
          Add a beans file.
 void destroy()
          Destroy the application context.
 org.springframework.context.ApplicationContext getApplicationContext()
          Return the application context.
 org.springframework.context.support.AbstractMessageSource getResourceBundle()
          Return the resource bundle of the IoC container.
 void inject(java.lang.Object bean)
          Inject the dependancies into the object.
 void loadContext()
          Load the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringContainer

public SpringContainer()
Construct a new SpringContainer.

Method Detail

getResourceBundle

public org.springframework.context.support.AbstractMessageSource getResourceBundle()
Description copied from interface: IocContainer
Return the resource bundle of the IoC container.

Specified by:
getResourceBundle in interface IocContainer
Returns:
The ressource bundle of the container.

getApplicationContext

public org.springframework.context.ApplicationContext getApplicationContext()
Description copied from interface: IocContainer
Return the application context.

Specified by:
getApplicationContext in interface IocContainer
Returns:
The Spring application context.

loadContext

public void loadContext()
Description copied from interface: IocContainer
Load the context.

Specified by:
loadContext in interface IocContainer

destroy

public void destroy()
Description copied from interface: IocContainer
Destroy the application context.

Specified by:
destroy in interface IocContainer

inject

public void inject(java.lang.Object bean)
Description copied from interface: IocContainer
Inject the dependancies into the object. A dependency is habitually declared with the Resource annotation. If the class has been annoted with AfterInject, the method will be invoked after the injection.

Specified by:
inject in interface IocContainer
Parameters:
bean - The object to inject dependencies into

addBeansFile

public void addBeansFile(java.lang.String file)
Description copied from interface: IocContainer
Add a beans file.

Specified by:
addBeansFile in interface IocContainer
Parameters:
file - The beans file to add.


Copyright © 2009 JTheque. All Rights Reserved.