Class ResponseBuilder.Composite

  • Enclosing class:
    ResponseBuilder

    public static final class ResponseBuilder.Composite
    extends ResponseBuilder
    ResponseBuilder that is a composition of multiple ResponseBuilders.

    Sometimes we need to look at multiple parts of the reply message (say, two header params, one body param, and three attachments, etc.) and that's when this object is used to combine multiple ResponseBuilders (that each responsible for handling one part).

    The model guarantees that only at most one ResponseBuilder will return a value as a return value (and everything else has to go to Holders.)