public class StreamMessageBuilder

Summary

Constructs AMQP Basic-class messages binary-compatible with QPid's "StreamMessage" wire encoding.

Field Summary

Flags Type Name Summary
public initonly static string MimeType

MIME type associated with QPid StreamMessages.

Constructor Summary

Flags Name Summary
public StreamMessageBuilder(IModel model, int initialAccumulatorSize)

Construct an instance for writing. See superclass.

public StreamMessageBuilder(IModel model)

Construct an instance for writing. See superclass.

Method Summary

Flags Name Summary
public virtual string GetDefaultContentType()

Override superclass method to answer our characteristic MIME type.

public virtual final IStreamMessageBuilder WriteBool(bool value)

Writes a bool value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteByte(byte value)

Writes a byte value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteBytes(byte[] source)

Writes a byte array into the message body being assembled.

public virtual final IStreamMessageBuilder WriteBytes(byte[] source, int offset, int count)

Writes a section of a byte array into the message body being assembled.

public virtual final IStreamMessageBuilder WriteChar(char value)

Writes a char value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteDouble(double value)

Writes a double value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteInt16(short value)

Writes a short value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteInt32(int value)

Writes an int value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteInt64(long value)

Writes a long value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteObject(object value)

Writes an object value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteObjects(object[] values)

Writes objects using WriteObject(), one after the other. No length indicator is written. See also IStreamMessageReader.ReadObjects().

public virtual final IStreamMessageBuilder WriteSingle(single value)

Writes a float value into the message body being assembled.

public virtual final IStreamMessageBuilder WriteString(string value)

Writes a string value into the message body being assembled.

Field Detail

public initonly static string MimeType

Summary

MIME type associated with QPid StreamMessages.

Constructor Detail

StreamMessageBuilder

public StreamMessageBuilder(IModel model, int initialAccumulatorSize)

Parameters
Name Type
model IModel
initialAccumulatorSize int

Summary

Construct an instance for writing. See superclass.

StreamMessageBuilder

public StreamMessageBuilder(IModel model)

Parameters
Name Type
model IModel

Summary

Construct an instance for writing. See superclass.

Method Detail

GetDefaultContentType

public virtual string GetDefaultContentType()

Flags public virtual
Return type string

Summary

Override superclass method to answer our characteristic MIME type.

WriteBool

public virtual final IStreamMessageBuilder WriteBool(bool value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value bool

Summary

Writes a bool value into the message body being assembled.

WriteByte

public virtual final IStreamMessageBuilder WriteByte(byte value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value byte

Summary

Writes a byte value into the message body being assembled.

WriteBytes

public virtual final IStreamMessageBuilder WriteBytes(byte[] source)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
source byte[]

Summary

Writes a byte array into the message body being assembled.

WriteBytes

public virtual final IStreamMessageBuilder WriteBytes(byte[] source, int offset, int count)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
source byte[]
offset int
count int

Summary

Writes a section of a byte array into the message body being assembled.

WriteChar

public virtual final IStreamMessageBuilder WriteChar(char value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value char

Summary

Writes a char value into the message body being assembled.

WriteDouble

public virtual final IStreamMessageBuilder WriteDouble(double value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value double

Summary

Writes a double value into the message body being assembled.

WriteInt16

public virtual final IStreamMessageBuilder WriteInt16(short value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value short

Summary

Writes a short value into the message body being assembled.

WriteInt32

public virtual final IStreamMessageBuilder WriteInt32(int value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value int

Summary

Writes an int value into the message body being assembled.

WriteInt64

public virtual final IStreamMessageBuilder WriteInt64(long value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value long

Summary

Writes a long value into the message body being assembled.

WriteObject

public virtual final IStreamMessageBuilder WriteObject(object value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value object

Summary

Writes an object value into the message body being assembled.

Remarks

The only permitted types are bool, int, short, byte, char, long, float, double, byte[] and string.

WriteObjects

public virtual final IStreamMessageBuilder WriteObjects(object[] values)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
values object[]

Summary

Writes objects using WriteObject(), one after the other. No length indicator is written. See also IStreamMessageReader.ReadObjects().

WriteSingle

public virtual final IStreamMessageBuilder WriteSingle(single value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value single

Summary

Writes a float value into the message body being assembled.

WriteString

public virtual final IStreamMessageBuilder WriteString(string value)

Flags public virtual final
Return type IStreamMessageBuilder
Parameters
Name Type
value string

Summary

Writes a string value into the message body being assembled.