Class AbstractProviderService<P extends Provider>

  • 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 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 interface ProviderService<P extends Provider>
        Returns:
        provider to which this service has been assigned