class message

Erweitert:

The message class encapsulates an EE message, including target, method and arguments as properties. The message can be statically defined by the URI or XML format specified here. An instance of the class can serialize, deserialize, and send the defined message.

The format for a message URI is an EE moniker, followed first by the method and then any arguments, which must be in the order expected by the specified method. Only non-complex types are allowed for arguments in the URI message format, i.e. no dictionary or array types allowed. The URI must be URL encoded. For example:

ee://aol/service/class?method=<methodName>&a1=123&a2=hello%20world...
The XML format for a message is a "message" element with attributes for the moniker, method, and arguments as child elements occuring in the order expected by the specified method. The XML format for arguments is as defined for basics' dictionaries and arrays, which are the only allowed complex types. For example:
<message moniker="ee://aol/service/class" method="methodToCall">
    <int32>123</int32>
    <string>hello world</string>
    <dictionary>
        <string key="name">Hello again</string>
        <bool key="isVisible">false</bool>
        <compound key="users">
            <array>
                <string>john</string>
                <string>tom</string>
            </array>
        </compound>
        <int32 key="width">400</int32>
    </dictionary>
    <array>
        <int32>10</int32>
        <int32>20</int32>
    </array>
</message>
A method signature for the above example would be: methodToCall(int32, string, basics::dictionary, basics::array).

Eigenschaften

Methoden