Package org.forgerock.openig.handler
Class SequenceHandler
- java.lang.Object
-
- org.forgerock.openig.handler.SequenceHandler
-
- All Implemented Interfaces:
org.forgerock.http.Handler
public class SequenceHandler extends Object implements org.forgerock.http.Handler
Processes a request through a sequence of handlers. This allows multi-request processing such as retrieving a form, extracting form content (e.g. nonce) and submitting in a subsequent request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSequenceHandler.HeapletCreates and initializes a sequence handler in a heap environment.
-
Constructor Summary
Constructors Constructor Description SequenceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceHandleraddBinding(org.forgerock.http.Handler handler, Expression<Boolean> postcondition)Binds sequenced handlers with sequence processing postconditions.org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException>handle(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)
-
-
-
Method Detail
-
addBinding
public SequenceHandler addBinding(org.forgerock.http.Handler handler, Expression<Boolean> postcondition)
Binds sequenced handlers with sequence processing postconditions.- Parameters:
handler- The name of the handler heap object to dispatch to if the associated condition yields true.postcondition- evaluated to determine if sequence continues (default:nulla.k.a. unconditional)- Returns:
- The current dispatch handler.
-
handle
public org.forgerock.util.promise.Promise<org.forgerock.http.protocol.Response,org.forgerock.util.promise.NeverThrowsException> handle(org.forgerock.services.context.Context context, org.forgerock.http.protocol.Request request)- Specified by:
handlein interfaceorg.forgerock.http.Handler
-
-