org.exoplatform.container
Class TenantsContainer
java.lang.Object
org.exoplatform.container.ConcurrentPicoContainer
org.exoplatform.container.mc.MCIntegrationContainer
org.exoplatform.container.CachingContainer
org.exoplatform.container.TenantsContainer
- All Implemented Interfaces:
- Serializable, org.picocontainer.Disposable, org.picocontainer.MutablePicoContainer, org.picocontainer.PicoContainer, org.picocontainer.Startable
- Direct Known Subclasses:
- ManageableContainer
public class TenantsContainer
- extends CachingContainer
TenantsContainer separate generally used components from ones what should be instantiated,
started and stopped on per-tenant basis.
It overrides component getters, registerComponent(ComponentAdapter) and
unregisterComponent(Object) methods to get components taking in account Current Tenant
context.
The Current Tenant context it's an abstraction what will be set by actual Multitenancy implementation (for
versions currently in production it's based on JCR Current Repository, but this should be transparent for
Kernel level and implementation can be changed in future).
- See Also:
- Serialized Form
|
Constructor Summary |
TenantsContainer()
|
TenantsContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory)
|
TenantsContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory,
org.picocontainer.PicoContainer parent)
|
TenantsContainer(org.picocontainer.PicoContainer parent)
|
| Methods inherited from class org.exoplatform.container.ConcurrentPicoContainer |
accept, accept, addChildContainer, addComponentToCtx, canBeDisposed, canBeStarted, canBeStopped, dispose, getComponentAdapter, getComponentAdapters, getComponentInstances, getParent, makeChildContainer, removeChildContainer, removeComponentFromCtx, start, stop, unregisterComponentByInstance, verify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tenantsContainerContext
protected TenantsContainerContext tenantsContainerContext
TenantsContainer
public TenantsContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory,
org.picocontainer.PicoContainer parent)
TenantsContainer
public TenantsContainer(org.picocontainer.PicoContainer parent)
TenantsContainer
public TenantsContainer(org.picocontainer.defaults.ComponentAdapterFactory componentAdapterFactory)
TenantsContainer
public TenantsContainer()
getComponentAdapterOfType
public org.picocontainer.ComponentAdapter getComponentAdapterOfType(Class componentType)
-
- Specified by:
getComponentAdapterOfType in interface org.picocontainer.PicoContainer- Overrides:
getComponentAdapterOfType in class CachingContainer
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
getComponentAdaptersOfType
public List getComponentAdaptersOfType(Class componentType)
-
- Specified by:
getComponentAdaptersOfType in interface org.picocontainer.PicoContainer- Overrides:
getComponentAdaptersOfType in class CachingContainer
getComponentInstancesOfType
public List getComponentInstancesOfType(Class componentType)
throws org.picocontainer.PicoException
-
- Specified by:
getComponentInstancesOfType in interface org.picocontainer.PicoContainer- Overrides:
getComponentInstancesOfType in class CachingContainer
- Throws:
org.picocontainer.PicoException
getComponentInstanceOfType
public Object getComponentInstanceOfType(Class componentType)
- If no
ComponentAdapter can be found it returns null otherwise
it first try to get it from the dependency resolution context if it still cannot
be found we get the instance from the ComponentAdapter.
- Specified by:
getComponentInstanceOfType in interface org.picocontainer.PicoContainer- Overrides:
getComponentInstanceOfType in class CachingContainer
- See Also:
PicoContainer.getComponentInstanceOfType(java.lang.Class)
registerComponent
public org.picocontainer.ComponentAdapter registerComponent(org.picocontainer.ComponentAdapter componentAdapter)
throws org.picocontainer.defaults.DuplicateComponentKeyRegistrationException
- Method interception that swaps the original component adapter for intercepting one
for components that require mc integration.
If mc integration isn't available in the current runtime environment, then interception
simply delegates to parent without interfering.
- Specified by:
registerComponent in interface org.picocontainer.MutablePicoContainer- Overrides:
registerComponent in class CachingContainer
- Parameters:
componentAdapter - original component adapter
- Returns:
- the original component adapter, or the intercepting component adapter
that takes care of mc integration
- Throws:
org.picocontainer.defaults.DuplicateComponentKeyRegistrationException
unregisterComponent
public org.picocontainer.ComponentAdapter unregisterComponent(Object componentKey)
-
- Specified by:
unregisterComponent in interface org.picocontainer.MutablePicoContainer- Overrides:
unregisterComponent in class CachingContainer
Copyright © 2013 eXo Platform SAS. All Rights Reserved.