InteractionContext (interface)

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.isis.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

InteractionContext.java
interface InteractionContext {
  Optional<Interaction> currentInteraction()     (1)
  Interaction currentInteractionElseFail()
}
1 currentInteraction()

Optionally, the currently active Interaction for the calling thread.

Members

currentInteraction()

Optionally, the currently active Interaction for the calling thread.

Implementation

This class (o.a.i.applib.services.iactn.InteractionContext) is also the default implementation.

Usage Notes

Typically domain objects will have little need to interact with the InteractionContext and Interaction directly. The services are used within the framework however, primarily to support the ExecutionSubscriber SPI, and to emit domain events over the EventBusService.

See Also