public class SwitchFilter extends Object implements org.forgerock.http.Filter
true
, then
the processing flow is diverted to the associated handler. If no condition evaluates to
true
, then the request flows normally through the filter.Modifier and Type | Class and Description |
---|---|
static class |
SwitchFilter.Heaplet
Creates and initializes an expect filter in a heap environment.
|
Constructor and Description |
---|
SwitchFilter() |
Modifier and Type | Method and Description |
---|---|
SwitchFilter |
addRequestCase(Expression<Boolean> condition,
org.forgerock.http.Handler handler)
Add a request switch case with a condition and the handler to execute if condition yields.
|
SwitchFilter |
addResponseCase(Expression<Boolean> condition,
org.forgerock.http.Handler handler)
Add a response switch case with a condition and the handler to execute if condition yields.
|
org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> |
filter(org.forgerock.services.context.Context context,
org.forgerock.http.protocol.Request request,
org.forgerock.http.Handler next) |
public SwitchFilter addRequestCase(Expression<Boolean> condition, org.forgerock.http.Handler handler)
condition
- expression to evaluatehandler
- handler to be executed if the condition yieldspublic SwitchFilter addResponseCase(Expression<Boolean> condition, org.forgerock.http.Handler handler)
condition
- expression to evaluatehandler
- handler to be executed if the condition yieldspublic org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> filter(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request, org.forgerock.http.Handler next)
filter
in interface org.forgerock.http.Filter
Copyright © 2025 Open Identity Platform Community. All rights reserved.