Class InteractionState


  • public class InteractionState
    extends java.lang.Object
    The state of the execution of an interaction.
    • Field Detail

      • INTERACTION_INITIAL

        public static final java.lang.String INTERACTION_INITIAL
        Interaction state initial (not yet started).
        See Also:
        Constant Field Values
      • INTERACTION_RUNNING

        public static final java.lang.String INTERACTION_RUNNING
        Interaction state running.
        See Also:
        Constant Field Values
      • INTERACTION_CANCELLED

        public static final java.lang.String INTERACTION_CANCELLED
        Interaction state cancelled.
        See Also:
        Constant Field Values
      • INTERACTION_FINISHED

        public static final java.lang.String INTERACTION_FINISHED
        Interaction state finished.
        See Also:
        Constant Field Values
      • CANCELLATION_SUCCEEDED

        public static final java.lang.String CANCELLATION_SUCCEEDED
        Constant identifying successful cancellation of interaction.
        See Also:
        Constant Field Values
      • CANCELLATION_FAILED

        public static final java.lang.String CANCELLATION_FAILED
        Constant identifying failed cancellation of interaction (failure explicitly stated by receiver side).
        See Also:
        Constant Field Values
      • CANCELLATION_UNKNOWN

        public static final java.lang.String CANCELLATION_UNKNOWN
        Constant identifying unknown state of cancellation of interaction (no response from receiver side within timeout).
        See Also:
        Constant Field Values
      • interaction_state

        protected java.lang.String interaction_state
        The interaction state.
      • failure

        protected java.lang.Object failure
        The failure (if any).
      • cancel_responses

        protected java.util.Map cancel_responses
        The received cancel responses (if any).
      • cancel_response_contents

        protected java.util.Map cancel_response_contents
        The cancel response contents (if any).
    • Constructor Detail

      • InteractionState

        public InteractionState()
        Create a new interaction state in default initial state "running".
    • Method Detail

      • getFailure

        public java.lang.Object getFailure()
        Get the failure description.
        Returns:
        The failure description (if any).
      • setFailure

        public void setFailure​(java.lang.Object failure)
        Set the failure description.
        Parameters:
        failure - The failure description to set.
      • getInteractionState

        public java.lang.String getInteractionState()
        Get the interaction state.
        Returns:
        The interaction state.
      • setInteractionState

        public void setInteractionState​(java.lang.String interaction_state)
        Set the interaction state.
        Parameters:
        interaction - state The interaction state to set.
      • addCancelResponse

        public void addCancelResponse​(IComponentIdentifier responder,
                                      java.lang.String response,
                                      java.lang.Object content)
        Add a cancel response.
      • getCancelResponders

        public IComponentIdentifier[] getCancelResponders​(java.lang.String response)
        Get all agents with a specific cancel response.
      • getCancelResponse

        public java.lang.String getCancelResponse​(IComponentIdentifier responder)
        Get the cancel response of an agent.
      • getCancelResponseContent

        public java.lang.Object getCancelResponseContent​(IComponentIdentifier responder)
        Get the details of a cancel response of a given agent. This will be any information that the agent sent as content of the cancel response.