[This is preliminary documentation and is subject to change.]
Called when a message has been received by the framework, before it is
dispatched to the Adk's message handlers.
An agent can implement this method to count the number of messages
received, to signal the user interface or other interested parties that
a message has arrived, to examine or change the raw content of incoming
messages before they're dispatched to the framework, or to prevent the
framework from dispatching messages to message handlers. When filtering
messages, return
CopyC# to allow the framework to process
this message,
CopyC# to silently discard the message, or
throw an AdkException to return an error to the server.
truefalse| C# | Visual Basic | Visual C++ |
MessagingReturnCode OnMessageReceived( SifMessageType messageType, StringBuilder message )
Function OnMessageReceived ( _ messageType As SifMessageType, _ message As StringBuilder _ ) As MessagingReturnCode
MessagingReturnCode OnMessageReceived ( SifMessageType messageType, StringBuilder^ message )
- messageType (SifMessageType)
- A message type constant (e.g.
CopyC#)SIFMessagingListener.SIF_EVENT
- message (StringBuilder)
- A StringBuffer containing the message to be sent. The contents of the buffer may be modified by this method.
a value indicating what to do with the message
| Exception | Condition |
|---|---|
| AdkException | may be thrown by this method to return an error
acknowledgement to the server
|