Package jadex.bdi.planlib.protocols
Class InteractionState
- java.lang.Object
- 
- jadex.bdi.planlib.protocols.InteractionState
 
- 
 public class InteractionState extends java.lang.ObjectThe state of the execution of an interaction.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Mapcancel_response_contentsThe cancel response contents (if any).protected java.util.Mapcancel_responsesThe received cancel responses (if any).static java.lang.StringCANCELLATION_FAILEDConstant identifying failed cancellation of interaction (failure explicitly stated by receiver side).static java.lang.StringCANCELLATION_SUCCEEDEDConstant identifying successful cancellation of interaction.static java.lang.StringCANCELLATION_UNKNOWNConstant identifying unknown state of cancellation of interaction (no response from receiver side within timeout).protected java.lang.ObjectfailureThe failure (if any).static java.lang.StringINTERACTION_CANCELLEDInteraction state cancelled.static java.lang.StringINTERACTION_FINISHEDInteraction state finished.static java.lang.StringINTERACTION_INITIALInteraction state initial (not yet started).static java.lang.StringINTERACTION_RUNNINGInteraction state running.protected java.lang.Stringinteraction_stateThe interaction state.
 - 
Constructor SummaryConstructors Constructor Description InteractionState()Create a new interaction state in default initial state "running".
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCancelResponse(IComponentIdentifier responder, java.lang.String response, java.lang.Object content)Add a cancel response.IComponentIdentifier[]getCancelResponders(java.lang.String response)Get all agents with a specific cancel response.java.lang.StringgetCancelResponse(IComponentIdentifier responder)Get the cancel response of an agent.java.lang.ObjectgetCancelResponseContent(IComponentIdentifier responder)Get the details of a cancel response of a given agent.java.lang.ObjectgetFailure()Get the failure description.java.lang.StringgetInteractionState()Get the interaction state.voidsetFailure(java.lang.Object failure)Set the failure description.voidsetInteractionState(java.lang.String interaction_state)Set the interaction state.
 
- 
- 
- 
Field Detail- 
INTERACTION_INITIALpublic static final java.lang.String INTERACTION_INITIAL Interaction state initial (not yet started).- See Also:
- Constant Field Values
 
 - 
INTERACTION_RUNNINGpublic static final java.lang.String INTERACTION_RUNNING Interaction state running.- See Also:
- Constant Field Values
 
 - 
INTERACTION_CANCELLEDpublic static final java.lang.String INTERACTION_CANCELLED Interaction state cancelled.- See Also:
- Constant Field Values
 
 - 
INTERACTION_FINISHEDpublic static final java.lang.String INTERACTION_FINISHED Interaction state finished.- See Also:
- Constant Field Values
 
 - 
CANCELLATION_SUCCEEDEDpublic static final java.lang.String CANCELLATION_SUCCEEDED Constant identifying successful cancellation of interaction.- See Also:
- Constant Field Values
 
 - 
CANCELLATION_FAILEDpublic 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_UNKNOWNpublic 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_stateprotected java.lang.String interaction_state The interaction state.
 - 
failureprotected java.lang.Object failure The failure (if any).
 - 
cancel_responsesprotected java.util.Map cancel_responses The received cancel responses (if any).
 - 
cancel_response_contentsprotected java.util.Map cancel_response_contents The cancel response contents (if any).
 
- 
 - 
Method Detail- 
getFailurepublic java.lang.Object getFailure() Get the failure description.- Returns:
- The failure description (if any).
 
 - 
setFailurepublic void setFailure(java.lang.Object failure) Set the failure description.- Parameters:
- failure- The failure description to set.
 
 - 
getInteractionStatepublic java.lang.String getInteractionState() Get the interaction state.- Returns:
- The interaction state.
 
 - 
setInteractionStatepublic void setInteractionState(java.lang.String interaction_state) Set the interaction state.- Parameters:
- interaction- state The interaction state to set.
 
 - 
addCancelResponsepublic void addCancelResponse(IComponentIdentifier responder, java.lang.String response, java.lang.Object content) Add a cancel response.
 - 
getCancelResponderspublic IComponentIdentifier[] getCancelResponders(java.lang.String response) Get all agents with a specific cancel response.
 - 
getCancelResponsepublic java.lang.String getCancelResponse(IComponentIdentifier responder) Get the cancel response of an agent.
 - 
getCancelResponseContentpublic 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.
 
- 
 
-