Table of Contents

Class AbstractMessageSendingTemplate<D>

Namespace
Steeltoe.Messaging.Core
Assembly
Steeltoe.Messaging.MessagingBase.dll
public abstract class AbstractMessageSendingTemplate<D> : IMessageSendingOperations<D>

Type Parameters

D
Inheritance
AbstractMessageSendingTemplate<D>
Implements
Derived
Inherited Members

Fields

CONVERSION_HINT_HEADER

public const string CONVERSION_HINT_HEADER = "conversionHint"

Field Value

string

Properties

DefaultSendDestination

public virtual D DefaultSendDestination { get; set; }

Property Value

D

MessageConverter

public virtual IMessageConverter MessageConverter { get; set; }

Property Value

IMessageConverter

RequiredDefaultSendDestination

protected virtual D RequiredDefaultSendDestination { get; }

Property Value

D

Methods

ConvertAndSend(object)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message and send it to a default destination.

public virtual void ConvertAndSend(object payload)

Parameters

payload object

the payload to send

ConvertAndSend(object, IMessagePostProcessor)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, apply the psot processor, and send it to the default destination.

public virtual void ConvertAndSend(object payload, IMessagePostProcessor postProcessor)

Parameters

payload object

the payload to send

postProcessor IMessagePostProcessor

the post processor to apply

ConvertAndSend(D, object)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message and send it to a specified destination.

public virtual void ConvertAndSend(D destination, object payload)

Parameters

destination D

the target destination

payload object

the payload to send

ConvertAndSend(D, object, IMessagePostProcessor)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, apply the psot processor, and send it to the specified destination.

public virtual void ConvertAndSend(D destination, object payload, IMessagePostProcessor postProcessor)

Parameters

destination D

the target destination

payload object

the payload to send

postProcessor IMessagePostProcessor

the post processor to apply

ConvertAndSend(D, object, IDictionary<string, object>)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message with the provided headers, and send it to a specified destination.

public virtual void ConvertAndSend(D destination, object payload, IDictionary<string, object> headers)

Parameters

destination D

the target destination

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

ConvertAndSend(D, object, IDictionary<string, object>, IMessagePostProcessor)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, with the provided headers, apply the psot processor, and send it to the specified destination.

public virtual void ConvertAndSend(D destination, object payload, IDictionary<string, object> headers, IMessagePostProcessor postProcessor)

Parameters

destination D

the target destination

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

postProcessor IMessagePostProcessor

the post processor to apply

ConvertAndSendAsync(object, IMessagePostProcessor, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, apply the psot processor, and send it to the default destination.

public virtual Task ConvertAndSendAsync(object payload, IMessagePostProcessor postProcessor, CancellationToken cancellationToken = default)

Parameters

payload object

the payload to send

postProcessor IMessagePostProcessor

the post processor to apply

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertAndSendAsync(object, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message and send it to a default destination.

public virtual Task ConvertAndSendAsync(object payload, CancellationToken cancellationToken = default)

Parameters

payload object

the payload to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertAndSendAsync(D, object, IMessagePostProcessor, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, apply the psot processor, and send it to the specified destination.

public virtual Task ConvertAndSendAsync(D destination, object payload, IMessagePostProcessor postProcessor, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

payload object

the payload to send

postProcessor IMessagePostProcessor

the post processor to apply

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertAndSendAsync(D, object, IDictionary<string, object>, IMessagePostProcessor, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message, with the provided headers, apply the psot processor, and send it to the specified destination.

public virtual Task ConvertAndSendAsync(D destination, object payload, IDictionary<string, object> headers, IMessagePostProcessor postProcessor, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

postProcessor IMessagePostProcessor

the post processor to apply

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertAndSendAsync(D, object, IDictionary<string, object>, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message with the provided headers, and send it to a specified destination.

public virtual Task ConvertAndSendAsync(D destination, object payload, IDictionary<string, object> headers, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertAndSendAsync(D, object, CancellationToken)

Convert the given object to serialized form, possibly using a message converter, wrap it as a message and send it to a specified destination.

public virtual Task ConvertAndSendAsync(D destination, object payload, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

payload object

the payload to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

DoConvert(object, IDictionary<string, object>, IMessagePostProcessor)

protected virtual IMessage DoConvert(object payload, IDictionary<string, object> headers, IMessagePostProcessor postProcessor)

Parameters

payload object
headers IDictionary<string, object>
postProcessor IMessagePostProcessor

Returns

IMessage

DoSend(D, IMessage)

protected abstract void DoSend(D destination, IMessage message)

Parameters

destination D
message IMessage

DoSendAsync(D, IMessage, CancellationToken)

protected abstract Task DoSendAsync(D destination, IMessage message, CancellationToken cancellationToken)

Parameters

destination D
message IMessage
cancellationToken CancellationToken

Returns

Task

ProcessHeadersToSend(IDictionary<string, object>)

protected virtual IDictionary<string, object> ProcessHeadersToSend(IDictionary<string, object> headers)

Parameters

headers IDictionary<string, object>

Returns

IDictionary<string, object>

Send(IMessage)

Send a message to a default destination.

public virtual void Send(IMessage message)

Parameters

message IMessage

the message to send

Send(D, IMessage)

Send a message to the given destination.

public virtual void Send(D destination, IMessage message)

Parameters

destination D

the target destination

message IMessage

the message to send

SendAsync(IMessage, CancellationToken)

Send a message to a default destination.

public virtual Task SendAsync(IMessage message, CancellationToken cancellationToken = default)

Parameters

message IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

SendAsync(D, IMessage, CancellationToken)

Send a message to the given destination.

public virtual Task SendAsync(D destination, IMessage message, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

message IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion