IMessage
in
This interface is a requirement for all classes that are responsible for receiving messages broadcasted by the messaging framework in CS.
It provides the general implementation / interface of message records.
Tags
Table of Contents
- getRegisteredMessageNames() : array<string|int, mixed>
- Returns the message names the current object wants to listen to.
- onMessage() : int
- Implements logic that is to be executed if a message arrives.
Methods
getRegisteredMessageNames()
Returns the message names the current object wants to listen to.
public
getRegisteredMessageNames() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of message names that the current object wants to listen to. Other messages forwarded to this object will be ignored.
onMessage()
Implements logic that is to be executed if a message arrives.
public
onMessage(CSProcessedMessage $oMessage) : int
Parameters
- $oMessage : CSProcessedMessage
-
The message definition containing APIs to process the corresponding data.
Tags
Return values
int —Expects one of the CSMessageConst::RESULT_* constants defining the result: RESULT_ACKNOWLEDGED The message has been processed successfully RESULT_DECLINED The message has not been processed and is expected to be delivered again RESULT_DELAYED The message is still processed asynchronously and will be acknowledged/declined later RESULT_FAILED: Message processing failed
