Table of Contents

Class IntegrationMessageBuilder

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

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 IntegrationMessageBuilder FromMessage(IMessage message)

Parameters

message IMessage

Returns

IntegrationMessageBuilder

ReadOnlyHeaders(IList<string>)

public IMessageBuilder ReadOnlyHeaders(IList<string> readOnlyHeaders)

Parameters

readOnlyHeaders IList<string>

Returns

IMessageBuilder

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 IntegrationMessageBuilder WithPayload(object payload)

Parameters

payload object

Returns

IntegrationMessageBuilder