Very similar to a hash map with one notable exception. IMapContainer does not detect duplicate key names on 'add'. If a field is added to the map with a key name that already exist, both fields will be present in the map. Only one field can be retrieved by that key name and it is not defined which field will be retrieved.
The key name field in Solace maps is case sensitive. For example, adding a field with the name key "field_1" and a field with name key "FIELD_1" will create two distinct fields that can both be retrieved.
public interface IMapContainer : ISDTContainer,
IDisposable
AddBool | Adds a bool field with the given name. |
AddByteArray | Adds a byte array field with the given name. |
AddChar | Adds a char field with the given name. |
AddDestination | Adds a IDestination instance field with the given name. |
AddDouble | Adds a double field with the given name. |
AddFloat | Adds a float field with the given name. |
AddInt16 | Adds a Int16 field with the given name. |
AddInt32 | Adds a Int32 field with the given name. |
AddInt64 | Adds a Int64 field with the given name. |
AddInt8 | Adds a Int8 field with the given name. |
AddNull | Adds a null field with the given name. |
AddSDTContainer | Adds a ISDTContainer field with the given name to this map container. |
AddSmfMsg | Adds a ISmfMessage field with the given name. |
AddString | Adds a string field with the given name. |
AddUInt16 | Adds a UInt16 field with the given name. |
AddUInt32 | Adds a UInt32 field with the given name. |
AddUInt64 | Adds a UInt64 field with the given name. |
AddUInt8 | Adds a UInt8 field with the given name. |
AddUnknownField |
Adds a IUnknownSDTField field with a given name.
An unknown field is by definition a valid SDT field, that's not known to the current version of the API. |
Close |
Closes the ISDTContainer, making it unusable for read or write operations.
It is an error to invoke this method in the following cases (An OperationErrorException will be thrown): (Inherited from ISDTContainer) |
CreateMap |
Creates a submap with the given name. The returned IMapContainer
is ready for read and write operations.
It is recommended to Close the IMapContainer when done. If it is not explicitly closed,
the container is automatically closed when the associated parent container is closed
or the associated message (if it is a message-dependent container) is disposed.
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. |
CreateStream |
Creates a substream with the given name. The returned IStreamContainer is
ready for read and write operations.
It is recommended to Close the IStreamContainer when done. If it is not explicitly closed,
the container is automatically closed when the associated parent container is closed
or the associated message (if it is a message-dependent container) is disposed.
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. |
DeleteField | Deletes the named field from the map. |
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) |
GetBool | Gets the field with the given name as a boolean. |
GetByteArray | Gets the field with the given name as a byte array. |
GetChar | Gets the field with the given name as a Char. |
GetDestination | Gets the field with the given name as a IDestination. |
GetDouble | Gets the field with the given name as a double. |
GetField |
This method returns a field of the given name.
If the returned ISDTField is of type SDTFieldType.MAP or SDTFieldType.STREAM, it is recommended to Close the container when done. If it is not explicitly closed, the container is automatically closed when the associated parent container is closed or the associated message (if it is a message-dependent container) is disposed. Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this container results in an OperationErrorException with ParamNullReference error subcode. |
GetFloat | Gets the field with the given name as a float. |
GetInt16 | Gets the field with the given name as a Int16. |
GetInt32 | Gets the field with the given name as a Int32. |
GetInt64 | Gets the field with a given name as a Int64. |
GetInt8 | Gets the field with the given name as a Int8.(converted to Int16) |
GetMap |
Opens the contained submap with the given name. The returned IMapContainer is ready
for read/write operations.
It is recommended to Close the IMapContainer when done. If it is not explicitly closed,
the container is automatically closed when the associated parent container is closed
or the associated message (if it is a message-dependent container) is disposed.
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. |
GetNext | Gets the next KeyValuePair(where key is a String and value is a ISDTField). If the returned ISDTField is of type SDTFieldType.MAP or SDTFieldType.STREAM, it is recommended to close the container when done. If it is not explicitly closed, the container is automatically closed when the associated parent container is closed or the associated message (if it is a message-dependent container) is disposed. |
GetNull | Gets the field with the given name as a null. This is a special accessor; any SDT type with the inclusion of map and stream can be read as null. |
GetSmfMsg | Gets the field with the given name as a ISmfMessage. |
GetStream |
Opens the contained substream with the given name. The returned IStreamContainer is
ready for read and write operations.
It is recommended to Close the IStreamContainer when done. If it is not explicitly closed,
the container is automatically closed when the associated parent container is closed
or the associated message (if it is a message-dependent container) is disposed.
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. |
GetString | Gets the field with the given name as a string. |
GetUInt16 | Gets the field with the given name as a UInt16 (converted to Int32). |
GetUInt32 | Gets the field with the given name as a UInt32 (converted to Int64). |
GetUInt64 | Gets the field with the given name as a UInt64 (converted to Int64, therefore there could be loss of precision). Note: The .NET API is CLS-compliant and therefore unsigned integers are not supported. |
GetUInt8 | Gets the field with the given name as a Byte (UInt8). |
HasNext |
When iterating through a container (map or stream), this method will return false when the end of the container is
reached without advancing the read cursor. It will return true otherwise.
(Inherited from ISDTContainer) |
Rewind |
Rewinds the container. Normally when HasNext returns
false, client applications must call Rewind if they want to reiterate over the container's fields.
(Inherited from ISDTContainer) |