Enum Class OutboundCorrelationStrategy

java.lang.Object
java.lang.Enum<OutboundCorrelationStrategy>
org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy
All Implemented Interfaces:
Serializable, Comparable<OutboundCorrelationStrategy>, Constable

@MinMuleVersion("4.1") public enum OutboundCorrelationStrategy extends Enum<OutboundCorrelationStrategy>
Lists the possible strategies to determine the correlation id that should be sent on an outbound operation which supports correlation.

Operations should invoke the getOutboundCorrelationId(CorrelationInfo, String) method to obtain the actual value. If empty, then no correlation id should be sent.

Since:
1.1
  • Enum Constant Details

  • Method Details

    • values

      public static OutboundCorrelationStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OutboundCorrelationStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getOutboundCorrelationId

      public abstract Optional<String> getOutboundCorrelationId(CorrelationInfo correlationInfo, String customCorrelationId)
      Determines the correlation id that should be sent through an outbound operation (if any).

      Depending on each strategy implementation, this method might return a customCorrelationId, the value of CorrelationInfo.getCorrelationId() or an Optional.empty() value.

      Parameters:
      correlationInfo - the current correlation info
      customCorrelationId - a custom correlation id set at the operation level. Use null if no custom value defined
      Returns:
      an optioanl correlation id value