Interaction
Represents an action invocation or property modification, resulting in some state change of the system. It captures not only the target object and arguments passed, but also builds up the call-graph, and captures metrics, eg for profiling.
The Interaction
can be used to obtain the Command object representing the top-level invocation action/property edit.
The distinction between Command and this object is perhaps subtle: the former represents the intention to invoke an action/edit a property, whereas this represents the actual invocation/edit itself.
To confuse matters slightly, historically the Command interface defines members (specifically: Command#getStartedAt() , Command#getCompletedAt() , Command#getResult() , Command#getException() ) which logically belong to this class instead; they remain in Command for backward compatibility only (and have been deprecated).
API
interface Interaction {
UUID getInteractionId() (1)
Command getCommand() (2)
Execution<?, ?> getCurrentExecution() (3)
Execution<?, ?> getPriorExecution() (4)
}
1 | getInteractionId()
The unique identifier of this interaction (inherited from HasInteractionId ) |
2 | getCommand()
Represents the intention to perform this interaction. |
3 | getCurrentExecution()
The current (most recently pushed) Execution . |
4 | getPriorExecution()
The execution that preceded the current one. |
Members
getInteractionId()
The unique identifier of this interaction (inherited from HasInteractionId )
This can be used to correlate to the Command that triggers the interaction, and to audit records ( org.apache.causeway.applib.services.publishing.spi.EntityPropertyChange s that are created as a consequence of the interaction.
getCurrentExecution()
The current (most recently pushed) Execution .