public static interface RequestInitiator.MessageAccess
An interface to access the messages handled by a request initiator. This interface is required in order to access the messages from call-back sub-behaviors registered to handle states of the initiator. It is not required by the corresponding call-back methods because they can get and set these messages with their parameters and return values, respectively.
It is important to note that the access to the methods is only possible if the initiator is currently in an appropriate state. Otherwise, an illegal state exception is thrown. The corresponding states can be found in the documentation for each access method.
Modifier and Type | Method and Description |
---|---|
List<Message> |
getAllResponses()
Returns an unmodifiable list of all responses to be handled.
|
List<Message> |
getAllResultNotifications()
Returns an unmodifiable list of all result notifications to be
handled.
|
Message |
getMessage()
Returns an incoming message to be handled.
|
ModifiableMessage |
getRequest()
Returns the request message provided in the constructor.
|
void |
setRequest(ModifiableMessage message)
Sets the prepared request message.
|
ModifiableMessage getRequest()
Returns the request message provided in the constructor.
This method can be called in the prepare-request state only.
IllegalStateException
- if the method is called in an illegal statevoid setRequest(ModifiableMessage message)
Sets the prepared request message.
This method can be called in the prepare-request state only.
message
- the prepared request messageIllegalStateException
- if the method is called in an illegal stateMessage getMessage()
Returns an incoming message to be handled.
This method can be called in all states handling incoming messages ( * propose, refuse, not-understood, inform, failure, out-of-sequence).
IllegalStateException
- if the method is called in an illegal stateList<Message> getAllResponses()
Returns an unmodifiable list of all responses to be handled.
This method can be called in the
handle-all-responses
state only.
IllegalStateException
- if the method is called in an illegal stateList<Message> getAllResultNotifications()
Returns an unmodifiable list of all result notifications to be handled.
This method can be called in the handle-all-result-notifications state only.
IllegalStateException
- if the method is called in an illegal stateCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.