Class ProgressStageBinding<C extends StageConfig>

  • Type Parameters:
    C - type that describes the stage config

    public final class ProgressStageBinding<C extends StageConfig>
    extends Object
    Binds together the progress stage with its config. Acts to enforce the generic binding between the two but also assists in the passing of the config to keep the progress stages from maintaining thread state, therefore promoting thread safety.
    Since:
    0.1.0
    • Method Detail

      • gatherInitialRequirements

        public JsonValue gatherInitialRequirements​(ProcessContext context)
                                            throws ResourceException
        Response for defining any initial requirements the bound stage may have.

        An empty json object implies no initial requirements.

        Parameters:
        context - the current process context
        Returns:
        json value representing the requirements or empty json object for no requirements
        Throws:
        ResourceException - if some expected state is invalid
      • getName

        public String getName()
        Return the name of the bound stage.
        Returns:
        the stage name
      • bind

        public static <C extends StageConfigProgressStageBinding<C> bind​(ProgressStage<C> stage,
                                                                           C config)
        Create a new binder instance.
        Type Parameters:
        C - the stage config type shared by the progress stage
        Parameters:
        stage - the progress stage
        config - the stage config
        Returns:
        a new binder instance