|
eXo Kernel :: Container 2.4.11-UXP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.ConcurrentPicoContainer
org.exoplatform.container.mc.MCIntegrationContainer
org.exoplatform.container.CachingContainer
org.exoplatform.container.TenantsContainer
org.exoplatform.container.management.ManageableContainer
org.exoplatform.container.ExoContainer
org.exoplatform.container.PortalContainer
public class PortalContainer
Created by The eXo Platform SAS
The Portal Container is an object responsible for loading services/components.
| Nested Class Summary | |
|---|---|
static class |
PortalContainer.RegisterTask
This class is used to register a portal container |
static class |
PortalContainer.UnregisterTask
This class is used to unregister a portal container |
| Nested classes/interfaces inherited from class org.exoplatform.container.ConcurrentPicoContainer |
|---|
ConcurrentPicoContainer.ContainerVisitor |
| Field Summary | |
|---|---|
static String |
DEFAULT_PORTAL_CONTAINER_NAME
The default name of the portal container |
static String |
DEFAULT_REALM_NAME
The default name of a the realm |
static String |
DEFAULT_REST_CONTEXT_NAME
The default name of a the ServletContext of the rest web application |
| Fields inherited from class org.exoplatform.container.ExoContainer |
|---|
context, LOG, parent, stopping |
| Fields inherited from class org.exoplatform.container.TenantsContainer |
|---|
tenantsContainerContext |
| Fields inherited from class org.exoplatform.container.ConcurrentPicoContainer |
|---|
componentAdapterFactory |
| Constructor Summary | |
|---|---|
PortalContainer(RootContainer parent,
javax.servlet.ServletContext portalContext)
|
|
| Method Summary | |
|---|---|
static void |
addInitTask(javax.servlet.ServletContext context,
RootContainer.PortalContainerInitTask task)
Add an init-task to all the portal container instances related to the given ServletContext |
static void |
addInitTask(javax.servlet.ServletContext context,
RootContainer.PortalContainerInitTask task,
String portalContainerName)
Add an init-task to all the portal container instances related to the given ServletContext if the given portal container name is null other it will execute the task only of this
portal container if the ServletContext is on of its dependencies |
SessionContainer |
createSessionContainer(String id,
String owner)
|
static Object |
getComponent(Class key)
|
String |
getConfigurationXML()
|
static PortalContainer |
getCurrentInstance(javax.servlet.ServletContext context)
We first try to get the ExoContainer that has been stored into the ThreadLocal if the value is of type PortalContainer, we return it otherwise we get the portal container corresponding the given servlet context |
static String |
getCurrentPortalContainerName()
Returns the name of the current portal container that has been stored into the ThreadLocal. |
static String |
getCurrentRealmName()
Returns the name of the current realm corresponding to the portal container that has been stored into the ThreadLocal. |
static String |
getCurrentRestContextName()
Returns the name of the current rest context corresponding to the portal container that has been stored into the ThreadLocal. |
static Object |
getCurrentSetting(String settingName)
Returns the current value of the setting corresponding to the portal container that has been stored into the ThreadLocal. |
static PortalContainer |
getInstance()
|
static PortalContainer |
getInstance(javax.servlet.ServletContext context)
Gives the first portal container instance related to the given ServletContext |
static PortalContainer |
getInstanceIfPresent()
|
List<SessionContainer> |
getLiveSessions()
|
String |
getName()
|
ClassLoader |
getPortalClassLoader()
|
PortalContainerInfo |
getPortalContainerInfo()
|
javax.servlet.ServletContext |
getPortalContext()
|
String |
getRealmName()
Returns the name of the realm corresponding to the current portal container |
static String |
getRealmName(String portalContainerName)
Returns the name of the realm corresponding to the given portal container name |
String |
getRestContextName()
Returns the name of the rest context corresponding to the current portal container |
static String |
getRestContextName(String portalContainerName)
Returns the name of the rest context corresponding to the given portal container name |
SessionManager |
getSessionManager()
|
Object |
getSetting(String settingName)
Returns the value of the setting corresponding to the current portal container |
static Object |
getSetting(String portalContainerName,
String settingName)
Returns the value of the setting corresponding to the given portal container name and the given setting name |
ClassLoader |
getWebAppClassLoader(javax.servlet.ServletContext context)
This gives the merged ClassLoader between the PortalContainerClassLoader and the
ClassLoader of the web application. |
static boolean |
isPortalContainerName(String name)
|
static boolean |
isPortalContainerNameDisabled(String name)
|
static boolean |
isScopeValid(PortalContainer container,
javax.servlet.ServletContext context)
Indicates if the given servlet context is a dependency of the given portal container |
boolean |
isStarted()
|
void |
registerContext(javax.servlet.ServletContext context)
Register a new servlet context that contains configuration files and potentially resource files We assume that this method is called within the initialization context of the related web application |
void |
removeSessionContainer(String sessionID)
|
static void |
setInstance(PortalContainer instance)
|
void |
start()
Start the components of this PicoContainer and all its logical child containers. |
void |
stop()
Stop the components of this PicoContainer and all its logical child containers. |
void |
unregisterContext(javax.servlet.ServletContext context)
Unregister a servlet context that contains configuration files and potentially resource files |
| Methods inherited from class org.exoplatform.container.ExoContainer |
|---|
addComponentLifecylePlugin, addContainerLifecylePlugin, createComponent, createComponent, destroyContainer, dispose, getConfiguration, getContext, getProfiles, hasProfile, initContainer, 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.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 |
|---|
public static String DEFAULT_PORTAL_CONTAINER_NAME
public static String DEFAULT_REST_CONTEXT_NAME
ServletContext of the rest web application
public static String DEFAULT_REALM_NAME
| Constructor Detail |
|---|
public PortalContainer(RootContainer parent,
javax.servlet.ServletContext portalContext)
| Method Detail |
|---|
public ClassLoader getWebAppClassLoader(javax.servlet.ServletContext context)
ClassLoader between the PortalContainerClassLoader and the
ClassLoader of the web application.
context - the ServletContext of the web application
ClassLoader between the PortalContainerClassLoader and
the ClassLoader of the web application that allows us to override resources contained
into the ClassLoader of the web applicationpublic ClassLoader getPortalClassLoader()
ClassLoader of the portal container after merging all the
ClassLoader of all ServletContext that have been registeredpublic javax.servlet.ServletContext getPortalContext()
ServletContext of the portal container after merging all the
ServletContext that have been registeredpublic void registerContext(javax.servlet.ServletContext context)
context - the ServletContext of the web application to registerpublic void unregisterContext(javax.servlet.ServletContext context)
context - the ServletContext of the web application to unregisterpublic String getName()
public String getConfigurationXML()
public SessionContainer createSessionContainer(String id,
String owner)
createSessionContainer in interface SessionManagerContainerid - the session container identifierowner - the owner namepublic void removeSessionContainer(String sessionID)
removeSessionContainer in interface SessionManagerContainersessionID - the identifier of session to removepublic List<SessionContainer> getLiveSessions()
getLiveSessions in interface SessionManagerContainerpublic SessionManager getSessionManager()
getSessionManager in interface SessionManagerContainerpublic PortalContainerInfo getPortalContainerInfo()
public static PortalContainer getInstance()
PortalContainer that has been stored into the related
ThreadLocal. If no value has been set the default portal container will be returnedpublic static PortalContainer getInstanceIfPresent()
ExoContainer that has been stored into the
ThreadLocal of ExoContainerContext. If no PortalContainer has been set,
it will return nullpublic static boolean isPortalContainerName(String name)
name - the portal container namePortalContainerConfig.isPortalContainerName(String)public static boolean isPortalContainerNameDisabled(String name)
name - the portal container namePortalContainerConfig.isPortalContainerNameDisabled(String)
public static void addInitTask(javax.servlet.ServletContext context,
RootContainer.PortalContainerInitTask task)
context - the context from which we extract the context nametask - the task to execute
public static void addInitTask(javax.servlet.ServletContext context,
RootContainer.PortalContainerInitTask task,
String portalContainerName)
null other it will execute the task only of this
portal container if the ServletContext is on of its dependencies
context - the context from which we extract the context nametask - the task to executeportalContainerName - the name of the portal container for which we want to execute the taskpublic static PortalContainer getInstance(javax.servlet.ServletContext context)
context - the context from which we extract the context namepublic static PortalContainer getCurrentInstance(javax.servlet.ServletContext context)
context - the context from which we extract the portal container namepublic static String getCurrentPortalContainerName()
public static String getCurrentRestContextName()
public static String getRestContextName(String portalContainerName)
portalContainerName - the name of the portal container for which we want the
name of the rest ServletContextpublic String getRestContextName()
public static String getCurrentRealmName()
public static String getRealmName(String portalContainerName)
portalContainerName - the name of the portal container for which we want the
name of the realm
public String getRealmName()
public static Object getCurrentSetting(String settingName)
null will be
returned
settingName - the name of the setting wanted
public static Object getSetting(String portalContainerName,
String settingName)
portalContainerName - the name of the portal container for which we want the
name of the value of the settingsettingName - the name of the setting wanted
public Object getSetting(String settingName)
settingName - the name of the setting wanted
public static boolean isScopeValid(PortalContainer container,
javax.servlet.ServletContext context)
container - the portal containercontext - the ServletContext
true if the dependencies matches, false otherwise;public boolean isStarted()
public void start()
ConcurrentPicoContainerStartable will be started.
start in interface org.picocontainer.Startablestart in class ExoContainerConcurrentPicoContainer.makeChildContainer(),
ConcurrentPicoContainer.addChildContainer(PicoContainer),
ConcurrentPicoContainer.removeChildContainer(PicoContainer)public void stop()
ConcurrentPicoContainerStartable will be stopped.
stop in interface org.picocontainer.Startablestop in class ExoContainerConcurrentPicoContainer.makeChildContainer(),
ConcurrentPicoContainer.addChildContainer(PicoContainer),
ConcurrentPicoContainer.removeChildContainer(PicoContainer)public static void setInstance(PortalContainer instance)
public static Object getComponent(Class key)
|
eXo Kernel :: Container 2.4.11-UXP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||