InteractionProvider

Provides the current thread’s Interaction .

An Interaction contains a top-level Execution representing the invocation of an action or the editing of a property. If that top-level action or property uses the org.apache.causeway.applib.services.wrapper.WrapperFactory domain service to invoke child actions/properties, then those sub-executions are captured as a call-graph. The Execution is thus a graph structure.

API

InteractionProvider.java
interface InteractionProvider {
  boolean isInInteraction()     (1)
  Optional<Interaction> currentInteraction()     (2)
  Optional<InteractionContext> currentInteractionContext()     (3)
  Optional<UUID> getInteractionId()     (4)
  int getInteractionLayerCount()     (5)
  Interaction currentInteractionElseFail()
  InteractionContext currentInteractionContextElseFail()
}
1 isInInteraction()

Whether there is a currently active Interaction for the calling thread.

2 currentInteraction()

Optionally, the currently active Interaction for the calling thread.

3 currentInteractionContext()

Optionally, the currently active InteractionContext for the calling thread.

4 getInteractionId()

Unique id of the current request- or test-scoped Interaction .

5 getInteractionLayerCount()

interaction-layer-stack size

Members

isInInteraction()

Whether there is a currently active Interaction for the calling thread.

currentInteraction()

Optionally, the currently active Interaction for the calling thread.

currentInteractionContext()

Optionally, the currently active InteractionContext for the calling thread.

getInteractionId()

Unique id of the current request- or test-scoped Interaction .

getInteractionLayerCount()

interaction-layer-stack size