Interface JsonPipelineExceptionHandler

All Superinterfaces:
rx.functions.Func2<JsonPipelineOutput,RuntimeException,rx.Observable<JsonPipelineOutput>>, rx.functions.Function
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @ConsumerType public interface JsonPipelineExceptionHandler extends rx.functions.Func2<JsonPipelineOutput,RuntimeException,rx.Observable<JsonPipelineOutput>>
A functional interface that allow users of the JsonPipeline to specify custom exception handling for 404 responses and other server-side or network exceptions via JsonPipeline.handleException(JsonPipelineExceptionHandler). You can get common implementations in the JsonPipelineExceptionHandlers class.
  • Method Details

    • call

      rx.Observable<JsonPipelineOutput> call(JsonPipelineOutput defaultFallbackContent, RuntimeException caughtException)
      The method that defines the exception handling behavior. You can either
      • return static fallback content (based on the given default fallback content) )
      • Setup another JsonPipeline to fetch fallback content, and return its output observable as obtained by JsonPipeline.getOutput()
      • Rethrow the exception
      Specified by:
      call in interface rx.functions.Func2<JsonPipelineOutput,RuntimeException,rx.Observable<JsonPipelineOutput>>
      Parameters:
      defaultFallbackContent - a default pipeline output object (which already has the appropriate status code set)
      caughtException - the exception being handled