Package org.refcodes.runtime
Interface RequestCorrelation<B extends RequestCorrelation<B>>
-
- Type Parameters:
B- The builder to return in order to be able to apply multiple build operations.
public interface RequestCorrelation<B extends RequestCorrelation<B>>Provides methods to set Request-Correlation behavior: When enabled viasetRequestCorrelation(boolean)(or the like), then an existing Request-Correlation-ID might be forwarded by setting it into theCorrelationsingleton viaCorrelation.REQUEST'sCorrelation.setId(String). When being disabled, then no Request-Correlation handling will be done, any existingCorrelation.REQUEST'sCorrelation.getId()may stay untouched!
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddisableRequestCorrelation()Disables the automatic Request-Correlation mechanism.default voidenableRequestCorrelation()Enables the automatic Request-Correlation mechanism.booleanhasRequestCorrelation()Determines whether Request-Correlation is being enabled or disabled.voidsetRequestCorrelation(boolean hasRequestCorrelation)Enables or disables the automatic Request-Correlation mechanism.BwithDisableRequestCorrelation()Builder method for thedisableRequestCorrelation()operation.BwithEnableRequestCorrelation()Builder method for theenableRequestCorrelation()operation.BwithRequestCorrelation(boolean hasRequestCorrelation)Builder method for thesetRequestCorrelation(boolean)operation.
-
-
-
Method Detail
-
setRequestCorrelation
void setRequestCorrelation(boolean hasRequestCorrelation)
Enables or disables the automatic Request-Correlation mechanism.- Parameters:
hasRequestCorrelation- When true then Request-Correlation is enabled, else disabled.
-
withRequestCorrelation
B withRequestCorrelation(boolean hasRequestCorrelation)
Builder method for thesetRequestCorrelation(boolean)operation.- Parameters:
hasRequestCorrelation- When true then Request-Correlation is enabled, else disabled.- Returns:
- The builder for applying multiple build operations.
-
enableRequestCorrelation
default void enableRequestCorrelation()
Enables the automatic Request-Correlation mechanism.
-
withEnableRequestCorrelation
B withEnableRequestCorrelation()
Builder method for theenableRequestCorrelation()operation.- Returns:
- The builder for applying multiple build operations.
-
disableRequestCorrelation
default void disableRequestCorrelation()
Disables the automatic Request-Correlation mechanism.
-
withDisableRequestCorrelation
B withDisableRequestCorrelation()
Builder method for thedisableRequestCorrelation()operation.- Returns:
- The builder for applying multiple build operations.
-
hasRequestCorrelation
boolean hasRequestCorrelation()
Determines whether Request-Correlation is being enabled or disabled.- Returns:
- True in case Request-Correlation is being enabled, else false.
-
-