|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProviderRegistry
The IProviderRegistry
is the central point of integration for most CPC plugins/extensions.
In order to allow loose coupling and easy replacement of the different CPC subsystem implementations
this interface provides a central registry service which CPC subsystems use to acquire provider instances
for the different CPC subsystem services.
I.e. the CPC Track plugin will use the lookupProvider() method to receive a CPC Store implementation which is then used for local clone storage.
Provider classes are never addressed directly, all interaction between IProviderRegistry based CPC subsystems should occur only via org.electrocodeogram.cpc.core.api interfaces or 3rd party API interfaces for new provider types.
A reference to the currently active IProviderRegistry
instance can be obtained via
CPCCorePlugin.getProviderRegistry()
.
NOTE: Any class implementing this interface should also implement IManagableProviderRegistry
.
CPCCorePlugin.getProviderRegistry()
,
DefaultProviderRegistry
,
IManagableProviderRegistry
,
IManagableProvider
Method Summary | |
---|---|
IProvider |
lookupProvider(java.lang.Class<? extends IProvider> providerType)
Returns the provider with the highest priority for the given type. |
IProvider |
lookupProvider(IProviderDescriptor providerDescriptor)
Returns an instance of the provider which corresponds to the given IProviderDescriptor . |
java.util.List<IProviderDescriptor> |
lookupProviders(java.lang.Class<? extends IProvider> providerType)
Returns a list of descriptors for all registered providers of the given type, ordered descending according to priority. |
Method Detail |
---|
IProvider lookupProvider(java.lang.Class<? extends IProvider> providerType)
Any non-null result is guaranteed to be castable to the given providerType.
providerType
- the type of the provider to lookup, never null
IProvider lookupProvider(IProviderDescriptor providerDescriptor)
IProviderDescriptor
.
The IProviderDescriptor
needs to be compatible with the IProviderRegistry
implementation.
Custom implementations of IProviderDescriptor
are not supported.
providerDescriptor
- a valid IProviderDescriptor
, never null.
lookupProvider(Class)
,
IProviderDescriptor
java.util.List<IProviderDescriptor> lookupProviders(java.lang.Class<? extends IProvider> providerType)
An instance for a given IProviderDescriptor
can be obtained by calling
lookupProvider(IProviderDescriptor)
.
providerType
- the type of the provider to lookup, never null
lookupProvider(IProviderDescriptor)
,
IProviderDescriptor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |