Module org.refcodes.runtime
Package org.refcodes.runtime
Interface SessionCorrelation<B extends SessionCorrelation<B>>
- Type Parameters:
B
- The builder to return in order to be able to apply multiple build operations.
public interface SessionCorrelation<B extends SessionCorrelation<B>>
Provides methods to set Session-Correlation behavior: When enabled via
setSessionCorrelation(boolean)
(or the like), then an existing
Session-Correlation-TID might be forwarded by setting it into the
Correlation
singleton via Correlation.SESSION
's
Correlation.setId(String)
. When being disabled, then no
Session-Correlation handling will be done, any existing
Correlation.SESSION
's Correlation.getId()
may stay untouched!-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Disables the automatic Session-Correlation mechanism.default void
Enables the automatic Session-Correlation mechanism.boolean
Determines whether Session-Correlation is being enabled or disabled.void
setSessionCorrelation
(boolean hasSessionCorrelation) Enables or disables the automatic Session-Correlation mechanism.Builder method for thedisableSessionCorrelation()
operation.Builder method for theenableSessionCorrelation()
operation.withSessionCorrelation
(boolean hasSessionCorrelation) Builder method for thesetSessionCorrelation(boolean)
operation.
-
Method Details
-
setSessionCorrelation
void setSessionCorrelation(boolean hasSessionCorrelation) Enables or disables the automatic Session-Correlation mechanism.- Parameters:
hasSessionCorrelation
- When true then Session-Correlation is enabled, else disabled.
-
withSessionCorrelation
Builder method for thesetSessionCorrelation(boolean)
operation.- Parameters:
hasSessionCorrelation
- When true then Session-Correlation is enabled, else disabled.- Returns:
- The builder for applying multiple build operations.
-
enableSessionCorrelation
default void enableSessionCorrelation()Enables the automatic Session-Correlation mechanism. -
withEnableSessionCorrelation
B withEnableSessionCorrelation()Builder method for theenableSessionCorrelation()
operation.- Returns:
- The builder for applying multiple build operations.
-
disableSessionCorrelation
default void disableSessionCorrelation()Disables the automatic Session-Correlation mechanism. -
withDisableSessionCorrelation
B withDisableSessionCorrelation()Builder method for thedisableSessionCorrelation()
operation.- Returns:
- The builder for applying multiple build operations.
-
hasSessionCorrelation
boolean hasSessionCorrelation()Determines whether Session-Correlation is being enabled or disabled.- Returns:
- True in case Session-Correlation is being enabled, else false.
-