Interface JsonPipelineAction


  • @ConsumerType
    public interface JsonPipelineAction
    A JSON pipeline action aids in specifying of custom operations, which could be applied on JsonPipelineOutput. Each action must called asynchronously as an element of JSON pipeline chain and could be added to the chain via JsonPipeline.applyAction(JsonPipelineAction). Action will be executed only as soon as the previous step result of the chain is available. A JSON pipeline action could be implemented in multiple cases, when the necessary operation is not present directly in the declared methods of JsonPipeline. The most usual cases of custom action implementation are - a custom transformation of the pipeline output is required. See JsonPipelineActions.simpleTransformation(String, Func1); - modification of existing or creation of a new pipeline output uses data, which require an access to an external data source. A call for such data could be implemented in the JSON pipeline action. Each implementation of JSON pipeline action must guarantee an identifier, provided by getId(). The identifier must be constant (non modifiable) per each new class instance, even if the pipeline output is changed. See JsonPipelineActions for existing implementations.
    • Method Detail

      • getId

        String getId()
        Provides an unique identifier of this actions, which must be guaranteed by the implementation to be constant during the whole lifetime of the action instance.
        Returns:
        unique identifier of this action
      • execute

        rx.Observable<JsonPipelineOutput> execute​(JsonPipelineOutput previousStepOutput,
                                                  JsonPipelineContext pipelineContext)
        Provides a subscription to the JSON pipeline output with the the results of this action.
        Parameters:
        previousStepOutput - a JSON pipeline output provided after pipeline has executed previous steps
        pipelineContext - the context of the JsonPipeline instance
        Returns:
        a subscription the result JSON pipeline output