Table of Contents

Class MutableIntegrationMessageBuilder

Namespace
Steeltoe.Integration.Support
Assembly
Steeltoe.Integration.IntegrationBase.dll
public class MutableIntegrationMessageBuilder : AbstractMessageBuilder, IMessageBuilder
Inheritance
MutableIntegrationMessageBuilder
Implements
Derived
Inherited Members

Constructors

MutableIntegrationMessageBuilder()

protected MutableIntegrationMessageBuilder()

Fields

_headers

protected IDictionary<string, object> _headers

Field Value

IDictionary<string, object>

_mutableMessage

protected MutableMessage _mutableMessage

Field Value

MutableMessage

Properties

CorrelationId

protected override object CorrelationId { get; }

Property Value

object

Headers

Gets the current headers of the message

public override IDictionary<string, object> Headers { get; }

Property Value

IDictionary<string, object>

Payload

Gets the payload of the message

public override object Payload { get; }

Property Value

object

SequenceDetails

protected override List<List<object>> SequenceDetails { get; }

Property Value

List<List<object>>

SequenceNumber

protected override object SequenceNumber { get; }

Property Value

object

SequenceSize

protected override object SequenceSize { get; }

Property Value

object

Methods

Build()

Build the message

public override IMessage Build()

Returns

IMessage

the message

CopyHeaders(IDictionary<string, object>)

Adds the headers to the message overwriting any existing values.

public override IMessageBuilder CopyHeaders(IDictionary<string, object> headersToCopy)

Parameters

headersToCopy IDictionary<string, object>

the headers to add

Returns

IMessageBuilder

the builder

CopyHeadersIfAbsent(IDictionary<string, object>)

Adds the headers to the message but will not overwrite any existing values.

public override IMessageBuilder CopyHeadersIfAbsent(IDictionary<string, object> headersToCopy)

Parameters

headersToCopy IDictionary<string, object>

the headers to add

Returns

IMessageBuilder

the builder

FromMessage(IMessage)

public static MutableIntegrationMessageBuilder FromMessage(IMessage message)

Parameters

message IMessage

Returns

MutableIntegrationMessageBuilder

GetMatchingHeaderNames(string, IDictionary<string, object>)

protected List<string> GetMatchingHeaderNames(string pattern, IDictionary<string, object> headers)

Parameters

pattern string
headers IDictionary<string, object>

Returns

List<string>

RemoveHeader(string)

Remove the header if present

public override IMessageBuilder RemoveHeader(string headerName)

Parameters

headerName string

the name of the header to remove

Returns

IMessageBuilder

the builder

RemoveHeaders(params string[])

Remove the headers matched by the header patterns from the message

public override IMessageBuilder RemoveHeaders(params string[] headerPatterns)

Parameters

headerPatterns string[]

header patterns to match

Returns

IMessageBuilder

the builder

SetHeader(string, object)

Add a header and value to the message

public override IMessageBuilder SetHeader(string headerName, object headerValue)

Parameters

headerName string

name of the header

headerValue object

value of the header item

Returns

IMessageBuilder

the builder

SetHeaderIfAbsent(string, object)

Add a header and value to the message if not present

public override IMessageBuilder SetHeaderIfAbsent(string headerName, object headerValue)

Parameters

headerName string

name of the header

headerValue object

value of the header item

Returns

IMessageBuilder

the builder

WithPayload(object)

public static MutableIntegrationMessageBuilder WithPayload(object payload)

Parameters

payload object

Returns

MutableIntegrationMessageBuilder

WithPayload(object, bool)

public static MutableIntegrationMessageBuilder WithPayload(object payload, bool generateHeaders)

Parameters

payload object
generateHeaders bool

Returns

MutableIntegrationMessageBuilder