eXo Kernel :: Container 2.4.4-CLD

org.exoplatform.container
Class ExoContainer

java.lang.Object
  extended by org.exoplatform.container.ConcurrentPicoContainer
      extended by org.exoplatform.container.mc.MCIntegrationContainer
          extended by org.exoplatform.container.CachingContainer
              extended by org.exoplatform.container.TenantsContainer
                  extended by org.exoplatform.container.management.ManageableContainer
                      extended by org.exoplatform.container.ExoContainer
All Implemented Interfaces:
Serializable, org.picocontainer.Disposable, org.picocontainer.MutablePicoContainer, org.picocontainer.PicoContainer, org.picocontainer.Startable
Direct Known Subclasses:
PortalContainer, RootContainer, StandaloneContainer

public class ExoContainer
extends ManageableContainer

Created by The eXo Platform SAS
The Exo Container is an object responsible for loading services/components. The eXoContainer class is inherited by all the containers, including RootContainer, PortalContainer, and StandaloneContainer. It itself inherits from a PicoContainer framework which allows eXo to apply the Inversion of Control (also known as IoC) principles.

Author:
Tuan Nguyen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.exoplatform.container.ConcurrentPicoContainer
ConcurrentPicoContainer.ContainerVisitor
 
Field Summary
protected  ExoContainerContext context
           
protected static Log LOG
           
protected  org.picocontainer.PicoContainer parent
           
protected  AtomicBoolean stopping
           
 
Fields inherited from class org.exoplatform.container.TenantsContainer
tenantsContainerContext
 
Fields inherited from class org.exoplatform.container.ConcurrentPicoContainer
componentAdapterFactory
 
Constructor Summary
  ExoContainer()
           
  ExoContainer(org.picocontainer.defaults.ComponentAdapterFactory factory, org.picocontainer.PicoContainer parent)
           
  ExoContainer(org.picocontainer.PicoContainer parent)
           
protected ExoContainer(org.picocontainer.PicoContainer parent, boolean initContext)
           
 
Method Summary
 void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin)
           
 void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin)
           
<T> T
createComponent(Class<T> clazz)
           
<T> T
createComponent(Class<T> clazz, InitParams params)
           
 void destroyContainer()
          Deprecated. 
 void dispose()
          Dispose the components of this PicoContainer and all its logical child containers.
protected  Configuration getConfiguration()
          Gets the ConfigurationManager from the given ExoContainer if it exists, then returns the nested Configuration otherwise it returns null
 ExoContainerContext getContext()
           
static Set<String> getProfiles()
          Returns an unmodifiable set of profiles defined by the value returned by invoking PropertyManager.getProperty(String) with the PropertyManager.RUNTIME_PROFILES property.
static boolean hasProfile(String profileName)
          Indicates whether or not a given profile exists
 void initContainer()
          Deprecated. 
 void start()
          Start the components of this PicoContainer and all its logical child containers.
 void start(boolean init)
          Starts the container
 void startContainer()
          Deprecated. 
 void stop()
          Stop the components of this PicoContainer and all its logical child containers.
 void stopContainer()
          Deprecated. 
protected  void unregisterAllComponents()
          Unregister all components from container to avoid keeping instances in memory.
 
Methods inherited from class org.exoplatform.container.management.ManageableContainer
getManagementContext, getMBeanServer, getRegisteredComponentNames, getScopingObjectName, registerComponentInstance, unregisterComponent
 
Methods inherited from class org.exoplatform.container.TenantsContainer
getComponentAdapterOfType, getComponentAdaptersOfType, getComponentInstance, getComponentInstanceOfType, getComponentInstancesOfType, registerComponent
 
Methods inherited from class org.exoplatform.container.CachingContainer
registerComponentImplementation, registerComponentImplementation, registerComponentImplementation, registerComponentImplementation, registerComponentInstance
 
Methods inherited from class org.exoplatform.container.mc.MCIntegrationContainer
hasMCKernel
 
Methods inherited from class org.exoplatform.container.ConcurrentPicoContainer
accept, accept, addChildContainer, addComponentToCtx, canBeDisposed, canBeStarted, canBeStopped, getComponentAdapter, getComponentAdapters, getComponentInstances, getParent, makeChildContainer, removeChildContainer, removeComponentFromCtx, unregisterComponentByInstance, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stopping

protected final AtomicBoolean stopping

LOG

protected static final Log LOG

context

protected ExoContainerContext context

parent

protected org.picocontainer.PicoContainer parent
Constructor Detail

ExoContainer

public ExoContainer()

ExoContainer

public ExoContainer(org.picocontainer.PicoContainer parent)

ExoContainer

public ExoContainer(org.picocontainer.defaults.ComponentAdapterFactory factory,
                    org.picocontainer.PicoContainer parent)

ExoContainer

protected ExoContainer(org.picocontainer.PicoContainer parent,
                       boolean initContext)
Method Detail

getProfiles

public static Set<String> getProfiles()
Returns an unmodifiable set of profiles defined by the value returned by invoking PropertyManager.getProperty(String) with the PropertyManager.RUNTIME_PROFILES property.

Returns:
the set of profiles

hasProfile

public static boolean hasProfile(String profileName)
Indicates whether or not a given profile exists

Parameters:
profileName - the name of the profile to check
Returns:
true if the profile exists, false otherwise.

getContext

public ExoContainerContext getContext()

initContainer

@Deprecated
public void initContainer()
                   throws Exception
Deprecated. 

Explicit calls are not allowed anymore

Throws:
Exception

dispose

public void dispose()
Description copied from class: ConcurrentPicoContainer
Dispose the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Disposable will be disposed.

Specified by:
dispose in interface org.picocontainer.Disposable
Overrides:
dispose in class ConcurrentPicoContainer
See Also:
ConcurrentPicoContainer.makeChildContainer(), ConcurrentPicoContainer.addChildContainer(PicoContainer), ConcurrentPicoContainer.removeChildContainer(PicoContainer)

start

public void start(boolean init)
Starts the container

Parameters:
init - indicates if the container must be initialized first

start

public void start()
Description copied from class: ConcurrentPicoContainer
Start the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Startable will be started.

Specified by:
start in interface org.picocontainer.Startable
Overrides:
start in class ConcurrentPicoContainer
See Also:
ConcurrentPicoContainer.makeChildContainer(), ConcurrentPicoContainer.addChildContainer(PicoContainer), ConcurrentPicoContainer.removeChildContainer(PicoContainer)

stop

public void stop()
Description copied from class: ConcurrentPicoContainer
Stop the components of this PicoContainer and all its logical child containers. Any component implementing the lifecycle interface Startable will be stopped.

Specified by:
stop in interface org.picocontainer.Startable
Overrides:
stop in class ManageableContainer
See Also:
ConcurrentPicoContainer.makeChildContainer(), ConcurrentPicoContainer.addChildContainer(PicoContainer), ConcurrentPicoContainer.removeChildContainer(PicoContainer)

startContainer

@Deprecated
public void startContainer()
                    throws Exception
Deprecated. 

Explicit calls are not allowed anymore

Throws:
Exception

stopContainer

@Deprecated
public void stopContainer()
                   throws Exception
Deprecated. 

Explicit calls are not allowed anymore

Throws:
Exception

destroyContainer

@Deprecated
public void destroyContainer()
                      throws Exception
Deprecated. 

Explicit calls are not allowed anymore

Throws:
Exception

addComponentLifecylePlugin

public void addComponentLifecylePlugin(ComponentLifecyclePlugin plugin)

addContainerLifecylePlugin

public void addContainerLifecylePlugin(ContainerLifecyclePlugin plugin)

createComponent

public <T> T createComponent(Class<T> clazz)
                  throws Exception
Throws:
Exception

createComponent

public <T> T createComponent(Class<T> clazz,
                             InitParams params)
                  throws Exception
Throws:
Exception

getConfiguration

protected Configuration getConfiguration()
Gets the ConfigurationManager from the given ExoContainer if it exists, then returns the nested Configuration otherwise it returns null


unregisterAllComponents

protected void unregisterAllComponents()
Unregister all components from container to avoid keeping instances in memory.


eXo Kernel :: Container 2.4.4-CLD

Copyright © 2013 eXo Platform SAS. All Rights Reserved.