Package org.onosproject.net.provider
Class AbstractProviderService<P extends Provider>
- java.lang.Object
-
- org.onosproject.net.provider.AbstractProviderService<P>
-
- Type Parameters:
P
- type of the information provider
- All Implemented Interfaces:
ProviderService<P>
public abstract class AbstractProviderService<P extends Provider> extends Object implements ProviderService<P>
Base implementation of a provider service, which tracks the provider to which it is issued and can be invalidated.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractProviderService(P provider)
Creates a provider service on behalf of the specified provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkValidity()
Checks the validity of this provider service.void
invalidate()
Invalidates this provider service.P
provider()
Returns the provider to which this service has been issued.
-
-
-
Constructor Detail
-
AbstractProviderService
protected AbstractProviderService(P provider)
Creates a provider service on behalf of the specified provider.- Parameters:
provider
- provider to which this service is being issued
-
-
Method Detail
-
invalidate
public void invalidate()
Invalidates this provider service.
-
checkValidity
public void checkValidity()
Checks the validity of this provider service.- Throws:
IllegalStateException
- if the service is no longer valid
-
provider
public P provider()
Description copied from interface:ProviderService
Returns the provider to which this service has been issued.- Specified by:
provider
in interfaceProviderService<P extends Provider>
- Returns:
- provider to which this service has been assigned
-
-