Class 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.
    • Constructor Detail

      • SequenceHandler

        public SequenceHandler()
    • 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: null a.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:
        handle in interface org.forgerock.http.Handler