The MessageInterface is the attachment of the event in the MessageReceived signal.
The MessageInterface describes messages sent to the users by the administrator of the 3djuump infinite architecture.
It contains the text of the message, if it is a critical message, a unique id, the start date when the message
will be or is applicable, and an end date when the message is no longer valid.
/** * Sample to illustrate the use of the messaging system of a DataSessionInterface (MessageInterface). */ import { DataSessionInterface, DataSessionInterfaceSignal, MessageInterface, tListenerCallback, InfiniteEvent } from'generated/documentation/appinfiniteapi';
// the DataSessionInterface has been created previously and is connected letlDataSession: DataSessionInterface; // what to do when a message is received letonMessageReceived : tListenerCallback; lDataSession.addEventListener(DataSessionInterfaceSignal.MessageReceived, onMessageReceived);
onMessageReceived = (pEvent: InfiniteEvent, _pCallbackData: Object | undefined) : void=> { constlMessage : MessageInterface | undefined = pEvent.attachments; if (!lMessage) { // if no message, then do nothing return; } // and output some fancy message, perhaps some fancy GUI handling is better ? :) console.log('message ' + lMessage.getId() + ' received :"' + lMessage.getMessage() + '"'); console.log('message is valid from ' + lMessage.getStartTime() + ' to ' + lMessage.getEndTime()); }
Please refer to the [DataSessionInterface](DataSessionInterface.html) for more information.
The MessageInterface is the attachment of the event in the MessageReceived signal.
The MessageInterface describes messages sent to the users by the administrator of the 3djuump infinite architecture. It contains the text of the message, if it is a critical message, a unique id, the start date when the message will be or is applicable, and an end date when the message is no longer valid.
Please refer to the [DataSessionInterface](DataSessionInterface.html) for more information.
See
DataSessionInterfaceSignal