Package org.onosproject.net.provider
Interface ProviderRegistry<P extends Provider,S extends ProviderService<P>>
-
- Type Parameters:
P
- type of the information providerS
- type of the provider service
- All Known Subinterfaces:
AlarmProviderRegistry
,ClusterMetadataProviderRegistry
,ControlMessageProviderRegistry
,DeviceProviderRegistry
,FlowRuleProviderRegistry
,GroupProviderRegistry
,HostProbingProviderRegistry
,HostProviderRegistry
,LinkProviderRegistry
,MeterProviderRegistry
,PacketProviderRegistry
,TopologyProviderRegistry
- All Known Implementing Classes:
AbstractListenerProviderRegistry
,AbstractProviderRegistry
public interface ProviderRegistry<P extends Provider,S extends ProviderService<P>>
Registry for tracking information providers with the core.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<ProviderId>
getProviders()
Returns a set of currently registered provider identities.S
register(P provider)
Registers the supplied provider with the core.void
unregister(P provider)
Unregisters the supplied provider.
-
-
-
Method Detail
-
register
S register(P provider)
Registers the supplied provider with the core.- Parameters:
provider
- provider to be registered- Returns:
- provider service for injecting information into core
- Throws:
IllegalArgumentException
- if the provider is registered already
-
unregister
void unregister(P provider)
Unregisters the supplied provider. As a result the previously issued provider service will be invalidated and any subsequent invocations of its methods may throwIllegalStateException
.Unregistering a provider that has not been previously registered results in a no-op.
- Parameters:
provider
- provider to be unregistered
-
getProviders
Set<ProviderId> getProviders()
Returns a set of currently registered provider identities.- Returns:
- set of provider identifiers
-
-