Package org.forgerock.openig.openam
Class CachePolicyDecisionFilter
java.lang.Object
org.forgerock.openig.tools.NotSupportedFilter
org.forgerock.openig.openam.CachePolicyDecisionFilter
- All Implemented Interfaces:
AutoCloseable,Filter
A CREST
Filter that caches policy decisions.-
Constructor Summary
ConstructorsConstructorDescriptionCachePolicyDecisionFilter(AsyncCache<String, ActionResponse, ResourceException> cache, NotificationService notificationService, DisconnectionStrategy disconnectionStrategy) Builds aCachePolicyDecisionFilter. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()filterAction(Context context, ActionRequest actionRequest, RequestHandler next) Filters an action request.Methods inherited from class org.forgerock.openig.tools.NotSupportedFilter
filterCreate, filterDelete, filterPatch, filterQuery, filterRead, filterUpdate
-
Constructor Details
-
CachePolicyDecisionFilter
public CachePolicyDecisionFilter(AsyncCache<String, ActionResponse, ResourceException> cache, NotificationService notificationService, DisconnectionStrategy disconnectionStrategy) Builds aCachePolicyDecisionFilter.- Parameters:
cache- The cache to use. Notnull.notificationService- The notification service used to connect on AM websocket notifications.disconnectionStrategy- The strategy to apply in case of notifications' disconnection.- Throws:
NullPointerException- If caffeine or clock arenull.
-
-
Method Details
-
filterAction
public Promise<ActionResponse,ResourceException> filterAction(Context context, ActionRequest actionRequest, RequestHandler next) Description copied from interface:FilterFilters an action request.- Specified by:
filterActionin interfaceFilter- Overrides:
filterActionin classNotSupportedFilter- Parameters:
context- The filter chain context.actionRequest- The action request.next- A request handler representing the remainder of the filter chain.- Returns:
- A
Promisecontaining the result of the operation.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-