Interface Service<Context,​Result>

    • Method Detail

      • handle

        @Nullable Result handle​(@NonNull Context context)
                         throws Exception
        Provide a response for the given context. If the service implementation cannot provide a response for the given context, it should return null
        context - Context used in the generation of the response
        Response. If the response isn't null, the next service in the service chain will get to act on the context. Otherwise the execution halts, and the provided response is the final response.
        Exception - Any exception that occurs during the handling can be thrown, and will be wrapped by a PipelineException
      • order

        default @Nullable ExecutionOrder order()
        Get the execution order of the service. This should not be overridden, unless you know what you are doing
        Execution order