Class Result.Builder<T,A>

java.lang.Object
org.mule.sdk.api.runtime.operation.Result.Builder<T,A>
Type Parameters:
T - the generic type of the output value
A - the generic type of the message attributes
Enclosing class:
Result<T,A>

public static class Result.Builder<T,A> extends Object
Builds instances of Result
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • output

      public Result.Builder<T,A> output(T output)
      Sets the output value
      Parameters:
      output - the new output value
      Returns:
      this builder
    • attributes

      public Result.Builder<T,A> attributes(A attributes)
      Sets the output attributes value
      Parameters:
      attributes - the new attributes value
      Returns:
      this builder
    • mediaType

      public Result.Builder<T,A> mediaType(org.mule.runtime.api.metadata.MediaType mediaType)
      Sets the output MediaType for the payload
      Parameters:
      mediaType - the new MediaType
      Returns:
      this builder
    • attributesMediaType

      public Result.Builder<T,A> attributesMediaType(org.mule.runtime.api.metadata.MediaType mediaType)
      Sets the output MediaType for the attributes
      Parameters:
      mediaType - the new MediaType
      Returns:
      this builder
    • length

      public Result.Builder<T,A> length(long length)
      Sets the length in bytes of the payload
      Parameters:
      length -
      Returns:
    • build

      public Result<T,A> build()
      Returns:
      the build Result