Interface RefreshStrategy
-
- All Known Implementing Classes:
RefreshStrategy.Composite,RefreshStrategy.Timed
public interface RefreshStrategyImplementations of this interface determine whether a session needs to be refreshed before the next session operation is performed. This is done by the session callingneedsRefresh(long)to determine whether a refresh is needed.- See Also:
RefreshStrategy.Composite,RefreshStrategy.Timed
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRefreshStrategy.CompositeComposite of zero or moreRefreshStrategyinstances, each of which covers a certain strategy.static classRefreshStrategy.TimedThis refresh strategy refreshes after a given timeout of inactivity.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanneedsRefresh(long secondsSinceLastAccess)Determine whether the given session needs to refresh before the next session operation is performed.voidrefreshed()
-
-
-
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
trueif and only if any of the individual refresh strategies passed to the constructor returnstrue.- Parameters:
secondsSinceLastAccess- seconds since last access- Returns:
trueif and only if the session needs to refresh.
-
refreshed
void refreshed()
-
-