eXo Kernel :: Container 2.4.13-GA

org.exoplatform.container
Class RootContainer

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.management.ManageableContainer
                  extended by org.exoplatform.container.ExoContainer
                      extended by org.exoplatform.container.RootContainer
All Implemented Interfaces:
Serializable, org.gatein.wci.authentication.AuthenticationListener, org.gatein.wci.WebAppListener, org.picocontainer.Disposable, org.picocontainer.MutablePicoContainer, org.picocontainer.PicoContainer, org.picocontainer.Startable

public class RootContainer
extends ExoContainer
implements org.gatein.wci.WebAppListener, org.gatein.wci.authentication.AuthenticationListener

Created by The eXo Platform SAS
A base container which plays an important role during the startup. However, it is recommended that it should not be used directly.

Author:
Tuan Nguyen
See Also:
Serialized Form

Nested Class Summary
static interface RootContainer.PortalContainerInitTask
          This interface is used to define a task that needs to be launched at a given state during the initialization of a portal container
static class RootContainer.PortalContainerPostCreateTask
          This class is used to define a task that needs to be launched after creating a portal container Those type of tasks must be launched after all the "post-init" tasks.
static class RootContainer.PortalContainerPostInitTask
          This class is used to define a task that needs to be launched after the initialization of a portal container
static class RootContainer.PortalContainerPreInitTask
          This class is used to define a task that needs to be launched before the initialization of a portal container
 
Nested classes/interfaces inherited from class org.exoplatform.container.ConcurrentPicoContainer
ConcurrentPicoContainer.ContainerVisitor
 
Field Summary
static String SESSION_TO_BE_INVALIDATED_ATTRIBUTE_NAME
          The name of the attribute used to mark a session as to be invalidated
 
Fields inherited from class org.exoplatform.container.ExoContainer
context, parent, stopping
 
Constructor Summary
RootContainer()
           
 
Method Summary
 void addInitTask(javax.servlet.ServletContext context, RootContainer.PortalContainerInitTask task)
          Calls the other method addInitTask with ServletContext.getServletContextName() as portal container name
 void addInitTask(javax.servlet.ServletContext context, RootContainer.PortalContainerInitTask task, String portalContainer)
          First check if the related portal container has already been initialized.
 void createPortalContainer(javax.servlet.ServletContext context)
          Create the portal container
 void createPortalContainers()
          Creates all the portal containers that have been registered thanks to the method registerPortalContainer
static Object getComponent(Class key)
           
 Object getComponentInstance(Object componentKey)
          
 String getConfigurationXML()
           
static RootContainer getInstance()
          Get the unique instance of the root container per VM.
 OperatingSystemInfo getOSEnvironment()
           
 PortalContainer getPortalContainer(String name)
           
 J2EEServerInfo getServerEnvironment()
           
 boolean isPortalContainerConfigAware()
          Indicates if the current instance is aware of the PortalContainerConfig
 void onEvent(org.gatein.wci.authentication.AuthenticationEvent evt)
          
 void onEvent(org.gatein.wci.WebAppEvent event)
          
 void registerPortalContainer(javax.servlet.ServletContext context)
          Register a new portal container.
 void reload()
          Makes the RootContainer reloads itself and all the portal containers
 void reload(String portalContainerName)
          Makes the RootContainer reloads only a given portal container
 void removePortalContainer(javax.servlet.ServletContext servletContext)
          Removes the portal container
static void setInstance(RootContainer rcontainer)
          Set the unique instance of the root container
 void stop()
          Stop the components of this PicoContainer and all its logical child containers.
 
Methods inherited from class org.exoplatform.container.ExoContainer
addComponentLifecylePlugin, addContainerLifecylePlugin, createComponent, createComponent, destroyContainer, dispose, getConfiguration, getContext, getProfiles, hasProfile, initContainer, start, start, startContainer, stopContainer, unregisterAllComponents
 
Methods inherited from class org.exoplatform.container.management.ManageableContainer
getManagementContext, getMBeanServer, getRegisteredComponentNames, getScopingObjectName, registerComponentInstance, unregisterComponent
 
Methods inherited from class org.exoplatform.container.CachingContainer
getComponentAdapterOfType, getComponentAdaptersOfType, getComponentInstanceOfType, getComponentInstancesOfType, registerComponent, 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

SESSION_TO_BE_INVALIDATED_ATTRIBUTE_NAME

public static final String SESSION_TO_BE_INVALIDATED_ATTRIBUTE_NAME
The name of the attribute used to mark a session as to be invalidated

Constructor Detail

RootContainer

public RootContainer()
Method Detail

getOSEnvironment

public OperatingSystemInfo getOSEnvironment()

isPortalContainerConfigAware

public boolean isPortalContainerConfigAware()
Indicates if the current instance is aware of the PortalContainerConfig

Returns:
true if we are using the old way to configure the portal containers, false otherwise

getServerEnvironment

public J2EEServerInfo getServerEnvironment()

getComponentInstance

public Object getComponentInstance(Object componentKey)
                            throws org.picocontainer.PicoException

Specified by:
getComponentInstance in interface org.picocontainer.PicoContainer
Overrides:
getComponentInstance in class CachingContainer
Throws:
org.picocontainer.PicoException

getPortalContainer

public PortalContainer getPortalContainer(String name)

registerPortalContainer

public void registerPortalContainer(javax.servlet.ServletContext context)
Register a new portal container. It will try to detect if PortalContainerDefinition has been defined, if so it will create the portal container later otherwise we assume that we expect the old behavior, thus the portal container will be initialized synchronously

Parameters:
context - the context of the portal container

createPortalContainers

public void createPortalContainers()
Creates all the portal containers that have been registered thanks to the method registerPortalContainer


onEvent

public void onEvent(org.gatein.wci.WebAppEvent event)

Specified by:
onEvent in interface org.gatein.wci.WebAppListener

onEvent

public void onEvent(org.gatein.wci.authentication.AuthenticationEvent evt)

Specified by:
onEvent in interface org.gatein.wci.authentication.AuthenticationListener

createPortalContainer

public void createPortalContainer(javax.servlet.ServletContext context)
Create the portal container

Parameters:
context - the servlet context

removePortalContainer

public void removePortalContainer(javax.servlet.ServletContext servletContext)
Removes the portal container

Parameters:
servletContext - the servlet context

getComponent

public static Object getComponent(Class key)

getInstance

public static RootContainer getInstance()
Get the unique instance of the root container per VM. The implementation relies on the double checked locking pattern to guarantee that only one instance will be initialized. See

Returns:
the root container singleton

setInstance

public static void setInstance(RootContainer rcontainer)
Set the unique instance of the root container

Parameters:
rcontainer - the root container

getConfigurationXML

public String getConfigurationXML()
Returns:
the configuration of the container in XML format

reload

public void reload()
Makes the RootContainer reloads itself and all the portal containers


reload

public void reload(String portalContainerName)
Makes the RootContainer reloads only a given portal container


addInitTask

public void addInitTask(javax.servlet.ServletContext context,
                        RootContainer.PortalContainerInitTask task)
Calls the other method addInitTask with ServletContext.getServletContextName() as portal container name

Parameters:
context - the servlet context from which the task comes from
task - the task to add

addInitTask

public void addInitTask(javax.servlet.ServletContext context,
                        RootContainer.PortalContainerInitTask task,
                        String portalContainer)
First check if the related portal container has already been initialized. If so it will call the method onAlreadyExists on the given task otherwise the task will be added to the task list to execute during the related portal container initialization

Parameters:
context - the servlet context from which the task comes from
task - the task to add
portalContainer - the name of the portal container on which the task must be executed

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 ExoContainer
See Also:
ConcurrentPicoContainer.makeChildContainer(), ConcurrentPicoContainer.addChildContainer(PicoContainer), ConcurrentPicoContainer.removeChildContainer(PicoContainer)

eXo Kernel :: Container 2.4.13-GA

Copyright © 2015 eXo Platform SAS. All Rights Reserved.