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 java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        java.lang.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