public static interface RequestResponder.MessageAccess
An interface to access the messages handled by a request responder. This interface is required in order to access the messages from call-back sub-behaviors registered to handle states of the responder. 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 responder 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.
RequestResponder
,
RequestResponder.getMessageAccess()
Modifier and Type | Method and Description |
---|---|
Message |
getRequest()
Returns the original request.
|
Message |
getResponse()
Returns the response to the original request.
|
void |
setResponse(ModifiableMessage response)
Sets the response to the original request.
|
void |
setResultNotification(ModifiableMessage resultNotification)
Sets the result notification to the original request.
|
Message getRequest()
Returns the original request.
This method can be called in all states covered by call-back sub-behaviors (handle-request, prepare-result-notification).
IllegalStateException
- if the method is called in an illegal statevoid setResponse(ModifiableMessage response)
Sets the response to the original request.
This method can be called in the handle-request state only.
response
- the response to the original requestIllegalStateException
- if the method is called in an illegal stateMessage getResponse()
Returns the response to the original request.
This method can be called in the prepare-result-notification state only.
IllegalStateException
- if the method is called in an illegal statevoid setResultNotification(ModifiableMessage resultNotification)
Sets the result notification to the original request.
This method can be called in the prepare-result-notification state only.
resultNotification
- the result notification to the original requestIllegalStateException
- if the method is called in an illegal stateCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.