public final class ECPProviderRegistryImpl extends ElementRegistry<InternalProvider,ECPObserver> implements ECPProviderRegistry
ECPProvider
.Constructor and Description |
---|
ECPProviderRegistryImpl()
Should not be called directly, use service instead.
|
Modifier and Type | Method and Description |
---|---|
void |
addProvider(ECPProvider provider)
Method to programmatically add an
ECPProvider to list of available provider. |
protected void |
doActivate() |
protected void |
doDeactivate() |
protected void |
elementsChanged(Collection<InternalProvider> oldElements,
Collection<InternalProvider> newElements) |
InternalProvider |
getProvider(Object adaptable)
Gets a provider from an adaptabel object.
|
InternalProvider |
getProvider(String name)
This method returns the ECPProvider based on the name.
|
Collection<ECPProvider> |
getProviders()
This method returns all known providers.
|
protected void |
notifyObservers(Collection<InternalProvider> oldProviders,
Collection<InternalProvider> newProviders)
Notifies observers that the elements in the registry have changed.
|
void |
removeProvider(String name)
Delete a provider programmatically from the list of available providers by its name.
|
addResolveListener, descriptorChanged, getElementName, removeResolveListener
addObserver, changeElements, disposed, doChangeElements, getElement, getElementCount, getElementNames, getElements, hasElement, hasElements, isDisposingElement, isRemoveDisposedElements, removeObserver
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
public ECPProviderRegistryImpl()
public InternalProvider getProvider(Object adaptable)
adaptable
- the adaptabel ObjectInternalProvider
public InternalProvider getProvider(String name)
getProvider
in interface ECPProviderRegistry
name
- the name of the ECPProvider
to search forECPProvider
public Collection<ECPProvider> getProviders()
getProviders
in interface ECPProviderRegistry
ECPProviders
public void addProvider(ECPProvider provider)
ECPProvider
to list of available provider.addProvider
in interface ECPProviderRegistry
provider
- the ECPProvider
to addpublic void removeProvider(String name)
removeProvider
in interface ECPProviderRegistry
name
- the name of the provider to deleteprotected void notifyObservers(Collection<InternalProvider> oldProviders, Collection<InternalProvider> newProviders) throws Exception
notifyObservers
in class Registry<InternalProvider,ECPObserver>
oldProviders
- The old collection of elementsnewProviders
- The new collection of elementsException
protected void elementsChanged(Collection<InternalProvider> oldElements, Collection<InternalProvider> newElements)
elementsChanged
in class Registry<InternalProvider,ECPObserver>
protected void doActivate() throws Exception
doActivate
in class org.eclipse.net4j.util.lifecycle.Lifecycle
Exception
Copyright © 2019. All rights reserved.