Inner Contents | |
| Repeating Groups | |
The OnixS::ICE::BOE::Messaging::SbeMessage represents a Simple Binary Encoding (SBE) message.
The Handler exposes the OnixS::ICE::BOE::Messaging::MessageHolder class to encapsulate services related to handling SBE messages. It is a template class, which creates an underlying buffer to store an SBE message.
The template parameter SbeMessageType serves to indicate how the underlying buffer will be interpreted and what type of SBE message it will store.
The OnixS::ICE::BOE::Messaging::MessageHolder class contains the OnixS::ICE::BOE::Messaging::SimpleOpenFramingHeader and a strongly typed SBE message over the underlying data buffer.
To access to the strongly typed SBE message, use the OnixS::ICE::BOE::Messaging::MessageHolder::message method or OnixS::ICE::BOE::Messaging::MessageHolder::operator->().
The following diagram shows the relationship between MessageHolder, the SBE message wrapper, and the underlying buffer:
The Handler exposes strongly typed SBE message wrappers (e.g.: OnixS::ICE::BOE::Messaging::ExecutionReport_New), which provide interfaces to manipulate SBE message fields. These wrappers are used in strongly typed inbound callbacks of the OnixS::ICE::BOE::SessionListener class (e.g.: OnixS::ICE::BOE::SessionListener::onExecutionReport_New).
If one needs to keep a message received in a strongly typed callback of the OnixS::ICE::BOE::SessionListener class, the message bytes should be copied to user-owned storage inside the callback.
The strongly typed callback argument is only a view over the Handler's internal receive buffer, so it should not be stored and used after the callback returns.
For example:
To create an SBE message object, use the OnixS::ICE::BOE::Messaging::MessageHolder constructor. It creates the underlying buffer and the strongly typed message wrapper around it.
For example:
For example: