public enum OutboundCorrelationStrategy extends Enum<OutboundCorrelationStrategy>
Operations should invoke the getOutboundCorrelationId(CorrelationInfo, String) method to obtain the actual value.
If empty, then no correlation id should be sent.
| Enum Constant and Description |
|---|
ALWAYS
This strategy always yields a correlation id, regardless of
CorrelationInfo.isOutboundCorrelationEnabled() |
AUTO
Whether to send a correlation id or not is defined by checking the
CorrelationInfo.isOutboundCorrelationEnabled()
method. |
NEVER
This strategy always returns
Optional.empty() |
| Modifier and Type | Method and Description |
|---|---|
abstract Optional<String> |
getOutboundCorrelationId(CorrelationInfo correlationInfo,
String customCorrelationId)
Determines the correlation id that should be sent through an outbound operation (if any).
|
static OutboundCorrelationStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OutboundCorrelationStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OutboundCorrelationStrategy AUTO
CorrelationInfo.isOutboundCorrelationEnabled()
method. If that method returns false, then an Optional.empty() value is returned. Otherwise, the same
behavior as ALWAYS will be usedpublic static final OutboundCorrelationStrategy ALWAYS
CorrelationInfo.isOutboundCorrelationEnabled()public static final OutboundCorrelationStrategy NEVER
Optional.empty()public static OutboundCorrelationStrategy[] values()
for (OutboundCorrelationStrategy c : OutboundCorrelationStrategy.values()) System.out.println(c);
public static OutboundCorrelationStrategy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract Optional<String> getOutboundCorrelationId(CorrelationInfo correlationInfo, String customCorrelationId)
Depending on each strategy implementation, this method might return a customCorrelationId, the value of
CorrelationInfo.getCorrelationId() or an Optional.empty() value.
correlationInfo - the current correlation infocustomCorrelationId - a custom correlation id set at the operation level. Use null if no custom value definedCopyright © 2019 MuleSoft, Inc.. All rights reserved.