SDTUtils Class

Solclient

SDTUtils Class
version: 7.2.1.27
Used to manipulate SDT components in a message.
Inheritance Hierarchy
SystemObject  SolaceSystems.Solclient.Messaging.SDTSDTUtils

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 class SDTUtils
Public Class SDTUtils
public ref class SDTUtils

The SDTUtils type exposes the following members.

Constructors
  NameDescription
Public methodSDTUtils
Initializes a new instance of the SDTUtils class
Top
Methods
  NameDescription
Public methodStatic memberCreateMap(Int32)
Allocates a memory buffer of size maxSize on the heap and creates a message-independent (free standing) IMapContainer within.

If the subsequent calls to add structured data types exceeds the buffer size an error (InsufficientSpace) is returned to the application.

Note: When using message-indpendent maps, it's an error to have more than one open subcontainer at once. In other words, client applications must close the open subcontainer before creating a new one. If such attempt is made, client applications will get an error with SDKErrorSubcode equal to OutOfMemory. Note that this limitation is not present with maps created with CreateMap(IMessage, Int32).

Note: Applications should call Dispose as soon as they're done with the map. Message-independent containers, when created, allocate memory resources.

Public methodStatic memberCreateMap(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.

Public methodStatic memberCreateStream(Int32)
Allocates a memory buffer of size bufferSize on the heap and creates a message-independent (free standing) IStreamContainer within.

If the subsequent calls to add structured data types exceeds the buffer size an error (InsufficientSpace) is returned to the application.

Note: When using message-indpendent streams, it's an error to have more than one open subcontainer at once. In other words, client applications must close the open subcontainer before creating a new one. If such attempt is made, client applications will get an error with SDKErrorSubcode equal to OutOfMemory. Note that this limitation is not present with streams created with CreateStream(IMessage, Int32).

Note: Applications should call Dispose as soon as they're done with the stream. Message-independent containers, when created, allocate memory resources.

Public methodStatic memberCreateStream(IMessage, Int32)
Creates a stream container (IStreamContainer) in the binary attachment part of the given message. Any existing data is overwritten. The returned IStreamContainer instance can be later used to add SDT fields. It is recommended to Close the IStreamContainer when done. If it is not explicitly closed, the stream 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 stream will result in an OperationErrorException with ParamNullReference error subcode.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberGetContainer
Returns an ISDTContainer (if available) within a message. The ISDTContainer could be either a IMapContainer or IStreamContainer. It is recommended to Close the ISDTContainer when done. If it is not explicitly closed, the container is automatically closed when the associated message is sent or disposed IDisposable.

Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this container will result in an OperationErrorException with ParamNullReference error subcode.

Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetText
If the message's binary payload contains a string, this method will return it. Otherwise it will return null.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberSetSDTContainer
Sets an SDT container as the binary attachment of a message. Any existing data in the message is overwritten. This method copies in from the given container, therefore changes to the container after this method returns will not be propagated to the message.
Public methodStatic memberSetText
Sets the binary attachment part of the message to the specified utf8 encoded string.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
See Also