Class PrimitiveMapInterceptor
This class provides a mechanism to intercept calls to a IPrimitiveMap
instance and perform validation, handle type conversion, or some other
function necessary to use the PrimitiveMap in a Message or other NMS
object.
Be default this class enforces the standard conversion policy for primitive
types in NMS shown in the table below:
|
boolean byte short char int long float double String byte[] |
boolean |
X X |
byte |
X X X X X |
short |
X X X X |
char |
X X |
int |
X X X |
long |
X X |
float |
X X X |
double |
X X |
String |
X X X X X X X X |
byte[] |
X |
---------------------------------------------------------------------- |
|
Inheritance
System.Object
PrimitiveMapInterceptor
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Apache.NMS.dll
Syntax
public class PrimitiveMapInterceptor : IPrimitiveMap
Constructors
PrimitiveMapInterceptor(IMessage, IPrimitiveMap)
Declaration
public PrimitiveMapInterceptor(IMessage message, IPrimitiveMap properties)
Parameters
PrimitiveMapInterceptor(IMessage, IPrimitiveMap, Boolean)
Declaration
public PrimitiveMapInterceptor(IMessage message, IPrimitiveMap properties, bool readOnly)
Parameters
PrimitiveMapInterceptor(IMessage, IPrimitiveMap, Boolean, Boolean)
Declaration
public PrimitiveMapInterceptor(IMessage message, IPrimitiveMap properties, bool readOnly, bool allowByteArrays)
Parameters
Type |
Name |
Description |
IMessage |
message |
|
IPrimitiveMap |
properties |
|
System.Boolean |
readOnly |
|
System.Boolean |
allowByteArrays |
|
Fields
message
Declaration
protected IMessage message
Field Value
properties
Declaration
protected IPrimitiveMap properties
Field Value
Properties
AllowByteArrays
Declaration
public bool AllowByteArrays { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Item[String]
Declaration
public object this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
Type |
Description |
System.Object |
|
Keys
Declaration
public ICollection Keys { get; }
Property Value
Type |
Description |
System.Collections.ICollection |
|
ReadOnly
Declaration
public bool ReadOnly { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Values
Declaration
public ICollection Values { get; }
Property Value
Type |
Description |
System.Collections.ICollection |
|
Methods
Clear()
Declaration
Contains(Object)
Declaration
public bool Contains(object key)
Parameters
Type |
Name |
Description |
System.Object |
key |
|
Returns
Type |
Description |
System.Boolean |
|
FailIfReadOnly()
Declaration
protected virtual void FailIfReadOnly()
GetBool(String)
Declaration
public bool GetBool(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
GetByte(String)
Declaration
public byte GetByte(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte |
|
GetBytes(String)
Declaration
public byte[] GetBytes(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte[] |
|
GetChar(String)
Declaration
public char GetChar(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Char |
|
GetDictionary(String)
Declaration
public IDictionary GetDictionary(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Collections.IDictionary |
|
GetDouble(String)
Declaration
public double GetDouble(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Double |
|
GetFloat(String)
Declaration
public float GetFloat(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Single |
|
GetInt(String)
Declaration
public int GetInt(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
GetList(String)
Declaration
public IList GetList(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Collections.IList |
|
GetLong(String)
Declaration
public long GetLong(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int64 |
|
GetObjectProperty(String)
Declaration
protected virtual object GetObjectProperty(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
System.Object |
|
GetShort(String)
Declaration
public short GetShort(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int16 |
|
GetString(String)
Declaration
public string GetString(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
Remove(Object)
Declaration
public void Remove(object key)
Parameters
Type |
Name |
Description |
System.Object |
key |
|
SetBool(String, Boolean)
Declaration
public void SetBool(string key, bool value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Boolean |
value |
|
SetByte(String, Byte)
Declaration
public void SetByte(string key, byte value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte |
value |
|
SetBytes(String, Byte[])
Declaration
public void SetBytes(string key, byte[] value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte[] |
value |
|
SetBytes(String, Byte[], Int32, Int32)
Declaration
public void SetBytes(string key, byte[] value, int offset, int length)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Byte[] |
value |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
SetChar(String, Char)
Declaration
public void SetChar(string key, char value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Char |
value |
|
SetDictionary(String, IDictionary)
Declaration
public void SetDictionary(string key, IDictionary dictionary)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.IDictionary |
dictionary |
|
SetDouble(String, Double)
Declaration
public void SetDouble(string key, double value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Double |
value |
|
SetFloat(String, Single)
Declaration
public void SetFloat(string key, float value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Single |
value |
|
SetInt(String, Int32)
Declaration
public void SetInt(string key, int value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int32 |
value |
|
SetList(String, IList)
Declaration
public void SetList(string key, IList list)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Collections.IList |
list |
|
SetLong(String, Int64)
Declaration
public void SetLong(string key, long value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int64 |
value |
|
SetObjectProperty(String, Object)
Declaration
protected virtual void SetObjectProperty(string name, object value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Object |
value |
|
SetShort(String, Int16)
Declaration
public void SetShort(string key, short value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.Int16 |
value |
|
SetString(String, String)
Declaration
public void SetString(string key, string value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
value |
|
Implements