public class ManagedContainer extends Lifecycle implements IManagedContainer
managed container
.IManagedContainer.ContainerAware
IContainer.Modifiable<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, isDeferredActivation
addListener, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
activate, deactivate, getLifecycleState, isActive
addListener, getListeners, hasListeners, removeListener
public IRegistry<IFactoryKey,IFactory> getFactoryRegistry()
getFactoryRegistry
in interface IManagedContainer
public ManagedContainer registerFactory(IFactory factory)
registerFactory
in interface IManagedContainer
public List<IElementProcessor> getPostProcessors()
getPostProcessors
in interface IManagedContainer
public void addPostProcessor(IElementProcessor postProcessor, boolean processExistingElements)
addPostProcessor
in interface IManagedContainer
public void addPostProcessor(IElementProcessor postProcessor)
addPostProcessor
in interface IManagedContainer
public void removePostProcessor(IElementProcessor postProcessor)
removePostProcessor
in interface IManagedContainer
public Set<String> getProductGroups()
getProductGroups
in interface IManagedContainer
public Set<String> getFactoryTypes(String productGroup)
getFactoryTypes
in interface IManagedContainer
public IFactory getFactory(String productGroup, String factoryType) throws FactoryNotFoundException
getFactory
in interface IManagedContainer
FactoryNotFoundException
public boolean isEmpty()
isEmpty
in interface IContainer<Object>
public String[] getElementKey(Object element)
getElementKey
in interface IManagedContainer
public Object[] getElements()
getElements
in interface IContainer<Object>
public Object[] getElements(String productGroup)
getElements
in interface IManagedContainer
public Object[] getElements(String productGroup, String factoryType)
getElements
in interface IManagedContainer
public Object getElement(String productGroup, String factoryType, String description) throws FactoryNotFoundException, ProductCreationException
getElement
in interface IManagedContainer
FactoryNotFoundException
ProductCreationException
public Object getElement(String productGroup, String factoryType, String description, boolean activate) throws FactoryNotFoundException, ProductCreationException
getElement
in interface IManagedContainer
FactoryNotFoundException
ProductCreationException
protected void activateElement(Object element)
public Object putElement(String productGroup, String factoryType, String description, Object element)
putElement
in interface IManagedContainer
protected Object putElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key, Object element)
public Object removeElement(String productGroup, String factoryType, String description)
removeElement
in interface IManagedContainer
protected Object removeElement(org.eclipse.net4j.util.container.ManagedContainer.ElementKey key)
public void clearElements()
clearElements
in interface IManagedContainer
public void loadElements(InputStream stream) throws IOException, FactoryNotFoundException, ProductCreationException
loadElements
in interface IManagedContainer
IOException
FactoryNotFoundException
ProductCreationException
public void saveElements(OutputStream stream) throws IOException
saveElements
in interface IManagedContainer
IOException
protected 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 Lifecycle
Exception
protected void doDeactivate() throws Exception
doDeactivate
in class Lifecycle
Exception
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.