Class TypedRequestFilter

    • Constructor Detail

      • TypedRequestFilter

        public TypedRequestFilter()
    • Method Detail

      • filter

        public final Flowable<Response> filter​(org.forgerock.services.context.Context context,
                                               Request request,
                                               RequestHandler next)
                                        throws Exception
        Description copied from interface: RequestFilter
        Filters the request and/or response of an exchange. To pass the request to the next filter or handler in the chain, the filter calls next.handle(context, request).

        This method may elect not to pass the request to the next filter or handler, and instead handle the request itself. It can achieve this by merely avoiding a call to next.handle(context, request) and creating its own response object. The filter is also at liberty to replace a response with another of its own by intercepting the response returned by the next handler.

        Specified by:
        filter in interface RequestFilter
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterAny

        protected Flowable<Response> filterAny​(org.forgerock.services.context.Context context,
                                               Request request,
                                               RequestHandler next)
                                        throws Exception
        Filters requests and their responses. The default behavior is to invoke RequestHandler.handle(Context, Request).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterAbandon

        protected Flowable<Response> filterAbandon​(org.forgerock.services.context.Context context,
                                                   AbandonRequest request,
                                                   RequestHandler next)
                                            throws Exception
        Filters abandon requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterAdd

        protected Flowable<Response> filterAdd​(org.forgerock.services.context.Context context,
                                               AddRequest request,
                                               RequestHandler next)
                                        throws Exception
        Filters add requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterBind

        protected Flowable<Response> filterBind​(org.forgerock.services.context.Context context,
                                                BindRequest request,
                                                RequestHandler next)
                                         throws Exception
        Filters bind requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterCompare

        protected Flowable<Response> filterCompare​(org.forgerock.services.context.Context context,
                                                   CompareRequest request,
                                                   RequestHandler next)
                                            throws Exception
        Filters compare requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterDelete

        protected Flowable<Response> filterDelete​(org.forgerock.services.context.Context context,
                                                  DeleteRequest request,
                                                  RequestHandler next)
                                           throws Exception
        Filters delete requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterExtended

        protected Flowable<Response> filterExtended​(org.forgerock.services.context.Context context,
                                                    ExtendedRequest<?> request,
                                                    RequestHandler next)
                                             throws Exception
        Filters extended requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterInvalid

        protected Flowable<Response> filterInvalid​(org.forgerock.services.context.Context context,
                                                   InvalidRequest request,
                                                   RequestHandler next)
                                            throws Exception
        Filters invalid requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterSearch

        protected Flowable<Response> filterSearch​(org.forgerock.services.context.Context context,
                                                  SearchRequest request,
                                                  RequestHandler next)
                                           throws Exception
        Filters search requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterModify

        protected Flowable<Response> filterModify​(org.forgerock.services.context.Context context,
                                                  ModifyRequest request,
                                                  RequestHandler next)
                                           throws Exception
        Filters modify requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterModifyDn

        protected Flowable<Response> filterModifyDn​(org.forgerock.services.context.Context context,
                                                    ModifyDnRequest request,
                                                    RequestHandler next)
                                             throws Exception
        Filters modify-dn requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterUnbind

        protected Flowable<Response> filterUnbind​(org.forgerock.services.context.Context context,
                                                  UnbindRequest request,
                                                  RequestHandler next)
                                           throws Exception
        Filters unbind requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.
      • filterUnknown

        protected Flowable<Response> filterUnknown​(org.forgerock.services.context.Context context,
                                                   UnknownRequest request,
                                                   RequestHandler next)
                                            throws Exception
        Filters unknown requests and their responses. The default behavior is to invoke filterAny(Context, Request, RequestHandler).
        Parameters:
        context - The request context.
        request - The request.
        next - The next filter or handler in the chain to handle the request.
        Returns:
        A Flowable representing the response to be returned to the client.
        Throws:
        Exception - If an error occurred during the processing of the request.