public class TenantsContainer extends AbstractInterceptor
holder, parentdelegate, tenantsContainerContext| Constructor and Description |
|---|
TenantsContainer() |
| Modifier and Type | Method and Description |
|---|---|
<T> ComponentAdapter<T> |
getComponentAdapter(Object componentKey,
Class<T> bindType,
boolean autoRegistration)
Find a component adapter associated with the specified key.
|
<T> ComponentAdapter<T> |
getComponentAdapterOfType(Class<T> componentType,
boolean autoRegistration)
Find a component adapter associated with the specified type.
|
<T> List<ComponentAdapter<T>> |
getComponentAdaptersOfType(Class<T> componentType)
Retrieve all component adapters inside this container that are associated with the specified type.
|
<T> T |
getComponentInstance(Object componentKey,
Class<T> bindType,
boolean autoRegistration)
Retrieve a component instance registered with a specific key.
|
<T> T |
getComponentInstanceOfType(Class<T> componentType,
boolean autoRegistration)
Find a component instance matching the specified type.
|
<T> List<T> |
getComponentInstancesOfType(Class<T> componentType)
Returns a List of components of a certain componentType.
|
<T> ComponentAdapter<T> |
registerComponentImplementation(Object componentKey,
Class<T> componentImplementation)
Register a component.
|
<T> ComponentAdapter<T> |
registerComponentInstance(Object componentKey,
T componentInstance)
Register an arbitrary object as a component in the container.
|
ComponentAdapter<?> |
unregisterComponent(Object componentKey)
Unregister a component by key.
|
getId, setHolder, setParent, setSuccessoraccept, createComponent, dispose, getComponentAdapters, getManagementContext, getMBeanServer, getScopingObjectName, getSuccessor, initialize, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaccept, createComponent, getComponentAdapters, getManagementContext, getMBeanServer, getScopingObjectName, getSuccessor, initializedisposepublic <T> ComponentAdapter<T> getComponentAdapterOfType(Class<T> componentType, boolean autoRegistration)
getComponentAdapterOfType in interface ContainergetComponentAdapterOfType in class AbstractContainercomponentType - the type of the component.autoRegistration - indicates whether the auto registration should be performed or notnull if no component has been
registered for the specified key.public <T> T getComponentInstance(Object componentKey, Class<T> bindType, boolean autoRegistration)
getComponentInstance in interface ContainergetComponentInstance in class AbstractContainercomponentKey - the key that the component was registered with.bindType - the expected type of the instance if one can be found.autoRegistration - indicates whether the auto registration should be performed or notnull if no component has been registered for the specified
key.public <T> ComponentAdapter<T> getComponentAdapter(Object componentKey, Class<T> bindType, boolean autoRegistration)
getComponentAdapter in interface ContainergetComponentAdapter in class AbstractContainercomponentKey - the key that the component was registered with.bindType - the expected raw type of the adapter if one can be found.autoRegistration - indicates whether the auto registration should be performed or notnull if no component has been registered
for the specified key.public <T> List<ComponentAdapter<T>> getComponentAdaptersOfType(Class<T> componentType)
getComponentAdaptersOfType in interface ContainergetComponentAdaptersOfType in class AbstractContainercomponentType - the type of the components.ComponentAdapters inside this container that are associated with
the specified type. Changes to this collection will not be reflected in the container itself.public <T> List<T> getComponentInstancesOfType(Class<T> componentType) throws ContainerException
getComponentInstancesOfType in interface ContainergetComponentInstancesOfType in class AbstractContainercomponentType - the searched type.ContainerExceptionpublic <T> T getComponentInstanceOfType(Class<T> componentType, boolean autoRegistration)
getComponentInstanceOfType in interface ContainergetComponentInstanceOfType in class AbstractContainercomponentType - the type of the component.autoRegistration - indicates whether the auto registration should be performed or notpublic <T> ComponentAdapter<T> registerComponentImplementation(Object componentKey, Class<T> componentImplementation) throws ContainerException
registerComponentImplementation in interface ContainerregisterComponentImplementation in class AbstractContainercomponentKey - a key that identifies the component. Must be unique within the container. The type
of the key object has no semantic significance unless explicitly specified in the
documentation of the implementing container.componentImplementation - the component's implementation class. This must be a concrete class (ie, a
class that can be instantiated).getXXX() methods of the
Container interface can be used to retrieve a reference to the component later on.ContainerExceptionpublic <T> ComponentAdapter<T> registerComponentInstance(Object componentKey, T componentInstance) throws ContainerException
registerComponentInstance in interface ContainerregisterComponentInstance in class AbstractContainercomponentKey - a key that identifies the component. Must be unique within the container. The type of the
key object has no semantic significance unless explicitly specified in the implementing
container.componentInstance - an arbitrary object.getXXX() methods of the
Container interface can be used to retrieve a reference to the component later on.ContainerException - if registration fails.public ComponentAdapter<?> unregisterComponent(Object componentKey)
unregisterComponent in interface ContainerunregisterComponent in class AbstractContainercomponentKey - key of the component to unregister.Copyright © 2015 eXo Platform SAS. All Rights Reserved.