Protocol Messages

A protocol message is an alias to prov::ServiceOrder when used in the context of client adapters.

The lifecycle of a protocol message depends entirely on the client adapter implementation. It decides how it is created, how it is deleted and if it can be reused or not.

The best structure to store custom client adapter data in a protocol message is its dataset. The dataset is a generic and powerful interface which can be assimilated into an extended hash table. The drawback of this genericness is that data may need some encoding/decoding before they are set to/get from a dataset.

For instance, in order to get an integer from a dataset, one has to call the SWString::stringToLong operation and eventually catch the swbuiltin::ExceptionDataError exception.

In order to mask this encoding/decoding phase, it can be a good idea for a client adapter to implement a local MessageProxy interface providing an API for accessing message data.

The client adapter framework provides its own provca::MessageProxy interface which provides access to the session which is currently processing the message, related client adapter name, and other data that may be useful in the context of a client adapter specialization. This interface can be inherited.