Interface RefreshStrategy

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  RefreshStrategy.Composite
      Composite of zero or more RefreshStrategy instances, each of which covers a certain strategy.
      static class  RefreshStrategy.Timed
      This refresh strategy refreshes after a given timeout of inactivity.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean needsRefresh​(long secondsSinceLastAccess)
      Determine whether the given session needs to refresh before the next session operation is performed.
      void refreshed()  
    • Method Detail

      • needsRefresh

        boolean needsRefresh​(long secondsSinceLastAccess)
        Determine whether the given session needs to refresh before the next session operation is performed.

        This implementation returns true if and only if any of the individual refresh strategies passed to the constructor returns true.

        Parameters:
        secondsSinceLastAccess - seconds since last access
        Returns:
        true if and only if the session needs to refresh.
      • refreshed

        void refreshed()