Class ExecutionWithResponse


  • public class ExecutionWithResponse
    extends Execution
    An execution which has a response which is returned when this gets to the end of the chain. This is useful to run processing chains where a response exists up front, typically for on completion listeners.
    Author:
    bratseth
    • Constructor Detail

      • ExecutionWithResponse

        public ExecutionWithResponse​(com.yahoo.component.chain.Chain<? extends Processor> chain,
                                     Response response,
                                     Execution execution)
        Creates an execution which will return a given response at the end of the chain.
        Parameters:
        chain - the chain to execute in this
        response - the response this will return from Execution.process(com.yahoo.processing.Request) then the end of this chain is reached
        execution - the the parent of this execution
    • Method Detail

      • defaultResponse

        protected Response defaultResponse​(Request request)
        Description copied from class: Execution
        Creates the default response to return from this kind of execution when there are no further processors. If this is overridden, make sure to propagate any freezeListener from this to the returned response top-level DataList.
        Overrides:
        defaultResponse in class Execution