Solclient
SDTUtilsCreateMap Method (IMessage, Int32) |
This method creates a map container (IMapContainer) in the binary attachment part of the
given message, and any existing data is overwritten. The returned IMapContainer instance
can be later used to add SDT fields.
It is recommended to Close the IMapContainer when done. If it is not explicitly closed,
the IMapContainer is automatically closed when the associated message is disposed IDisposable.
Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this map will result in an OperationErrorException with ParamNullReference error subcode.
Namespace: SolaceSystems.Solclient.Messaging.SDT
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
public static IMapContainer CreateMap( IMessage message, int initialSize )
Public Shared Function CreateMap ( message As IMessage, initialSize As Integer ) As IMapContainer
public: static IMapContainer^ CreateMap( IMessage^ message, int initialSize )
Parameters
- message
- Type: SolaceSystems.Solclient.MessagingIMessage
The message to create the map container in. - initialSize
- Type: SystemInt32
This value must be greater or equal to zero. It hints to the size of the map that will be created, it is used to determine the size of datablock to allocate. If it is too small for the subsequently created map, a larger datablock is allocated when necessary and existing SDT data is copied into place. This reallocation can negatively affect performance.
Return Value
Type: IMapContainerThe created map container.
Exceptions
Exception | Condition |
---|---|
OperationErrorException | Thrown when an error occurs. In this case ReturnCode and SDKErrorInfo are accessible from OperationErrorException and contain more information. |
FatalErrorException | Thrown when an unrecoverable error occurs. |
ArgumentNullException | Thrown when the message is null. |
ArgumentOutOfRangeException | Thrown when initial size is less than zero. |
See Also