public class ManagedContainer extends Lifecycle implements IManagedContainer
managed container.IManagedContainer.ContainerAwareIContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>ILifecycle.DeferrableActivation| Constructor and Description |
|---|
ManagedContainer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activateElement(Object element) |
void |
addPostProcessor(IElementProcessor postProcessor) |
void |
addPostProcessor(IElementProcessor postProcessor,
boolean processExistingElements) |
void |
clearElements() |
protected Object |
createElement(String productGroup,
String factoryType,
String description) |
protected IRegistry<IFactoryKey,IFactory> |
createFactoryRegistry() |
protected List<IElementProcessor> |
createPostProcessors() |
protected void |
doActivate() |
protected void |
doDeactivate() |
void |
fireEvent(IEvent event) |
Object |
getElement(String productGroup,
String factoryType,
String description) |
Object |
getElement(String productGroup,
String factoryType,
String description,
boolean activate) |
String[] |
getElementKey(Object element) |
protected Map.Entry<org.eclipse.net4j.util.container.ManagedContainer.ElementKey,Object>[] |
getElementRegistryEntries() |
protected org.eclipse.net4j.util.container.ManagedContainer.ElementKey[] |
getElementRegistryKeys() |
protected Object[] |
getElementRegistryValues() |
Object[] |
getElements() |
Object[] |
getElements(String productGroup) |
Object[] |
getElements(String productGroup,
String factoryType) |
IFactory |
getFactory(String productGroup,
String factoryType) |
IRegistry<IFactoryKey,IFactory> |
getFactoryRegistry() |
Set<String> |
getFactoryTypes(String productGroup) |
List<IElementProcessor> |
getPostProcessors() |
Set<String> |
getProductGroups() |
boolean |
isEmpty() |
void |
loadElements(InputStream stream) |
protected Object |
postProcessElement(String productGroup,
String factoryType,
String description,
Object element) |
protected Object |
putElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key,
Object element) |
Object |
putElement(String productGroup,
String factoryType,
String description,
Object element) |
ManagedContainer |
registerFactory(IFactory factory) |
protected Object |
removeElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key) |
Object |
removeElement(String productGroup,
String factoryType,
String description) |
void |
removePostProcessor(IElementProcessor postProcessor) |
void |
saveElements(OutputStream stream) |
String |
toString() |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivationaddListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactivate, deactivate, getLifecycleState, isActiveaddListener, getListeners, hasListeners, removeListenerpublic IRegistry<IFactoryKey,IFactory> getFactoryRegistry()
getFactoryRegistry in interface IManagedContainerpublic ManagedContainer registerFactory(IFactory factory)
registerFactory in interface IManagedContainerpublic List<IElementProcessor> getPostProcessors()
getPostProcessors in interface IManagedContainerpublic void addPostProcessor(IElementProcessor postProcessor, boolean processExistingElements)
addPostProcessor in interface IManagedContainerpublic void addPostProcessor(IElementProcessor postProcessor)
addPostProcessor in interface IManagedContainerpublic void removePostProcessor(IElementProcessor postProcessor)
removePostProcessor in interface IManagedContainerpublic Set<String> getProductGroups()
getProductGroups in interface IManagedContainerpublic Set<String> getFactoryTypes(String productGroup)
getFactoryTypes in interface IManagedContainerpublic IFactory getFactory(String productGroup, String factoryType) throws FactoryNotFoundException
getFactory in interface IManagedContainerFactoryNotFoundExceptionpublic boolean isEmpty()
isEmpty in interface IContainer<Object>public String[] getElementKey(Object element)
getElementKey in interface IManagedContainerpublic Object[] getElements()
getElements in interface IContainer<Object>public Object[] getElements(String productGroup)
getElements in interface IManagedContainerpublic Object[] getElements(String productGroup, String factoryType)
getElements in interface IManagedContainerpublic Object getElement(String productGroup, String factoryType, String description) throws FactoryNotFoundException, ProductCreationException
getElement in interface IManagedContainerFactoryNotFoundExceptionProductCreationExceptionpublic Object getElement(String productGroup, String factoryType, String description, boolean activate) throws FactoryNotFoundException, ProductCreationException
getElement in interface IManagedContainerFactoryNotFoundExceptionProductCreationExceptionprotected void activateElement(Object element)
public Object putElement(String productGroup, String factoryType, String description, Object element)
putElement in interface IManagedContainerprotected Object putElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key, Object element)
public Object removeElement(String productGroup, String factoryType, String description)
removeElement in interface IManagedContainerprotected Object removeElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key)
public void clearElements()
clearElements in interface IManagedContainerpublic void loadElements(InputStream stream) throws IOException, FactoryNotFoundException, ProductCreationException
loadElements in interface IManagedContainerIOExceptionFactoryNotFoundExceptionProductCreationExceptionpublic void saveElements(OutputStream stream) throws IOException
saveElements in interface IManagedContainerIOExceptionprotected IRegistry<IFactoryKey,IFactory> createFactoryRegistry()
protected List<IElementProcessor> createPostProcessors()
protected org.eclipse.net4j.util.container.ManagedContainer.ElementKey[] getElementRegistryKeys()
protected Object[] getElementRegistryValues()
protected Map.Entry<org.eclipse.net4j.util.container.ManagedContainer.ElementKey,Object>[] getElementRegistryEntries()
protected Object createElement(String productGroup, String factoryType, String description) throws FactoryNotFoundException, ProductCreationException
protected Object postProcessElement(String productGroup, String factoryType, String description, Object element)
protected void doActivate()
throws Exception
doActivate in class LifecycleExceptionprotected void doDeactivate()
throws Exception
doDeactivate in class LifecycleExceptionCopyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html