Table of Contents

Class AbstractDestinationResolvingMessagingTemplate<D>

Namespace
Steeltoe.Messaging.Core
Assembly
Steeltoe.Messaging.MessagingBase.dll
public abstract class AbstractDestinationResolvingMessagingTemplate<D> : AbstractMessagingTemplate<D>, IDestinationResolvingMessageSendingOperations<D>, IMessageSendingOperations<D>, IDestinationResolvingMessageReceivingOperations<D>, IMessageReceivingOperations<D>, IDestinationResolvingMessageRequestReplyOperations<D>, IMessageRequestReplyOperations<D>

Type Parameters

D
Inheritance
AbstractDestinationResolvingMessagingTemplate<D>
Implements
Derived
Inherited Members

Constructors

AbstractDestinationResolvingMessagingTemplate(IApplicationContext)

public AbstractDestinationResolvingMessagingTemplate(IApplicationContext context)

Parameters

context IApplicationContext

Properties

ApplicationContext

public virtual IApplicationContext ApplicationContext { get; }

Property Value

IApplicationContext

DestinationResolver

public IDestinationResolver<D> DestinationResolver { get; set; }

Property Value

IDestinationResolver<D>

Methods

ConvertAndSend(string, object)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message and send it to the resolved destination.

public virtual void ConvertAndSend(string destinationName, object payload)

Parameters

destinationName string

the destination name to resolve

payload object

the payload to send

ConvertAndSend(string, object, IMessagePostProcessor)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message, apply the post processor, and send it to the resolved destination.

public virtual void ConvertAndSend(string destinationName, object payload, IMessagePostProcessor postProcessor)

Parameters

destinationName string

the destination name to resolve

payload object

the payload to send

postProcessor IMessagePostProcessor

the post processor to apply

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

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message with the given headers, and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

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

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message with the given headers, apply the post processor and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

payload object

the payload to send

headers IDictionary<string, object>

the headers to send

postProcessor IMessagePostProcessor

the post processor to apply

ConvertAndSendAsync(string, object, IMessagePostProcessor, CancellationToken)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message, apply the post processor, and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

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(string, object, IDictionary<string, object>, IMessagePostProcessor, CancellationToken)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message with the given headers, apply the post processor and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

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(string, object, IDictionary<string, object>, CancellationToken)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message with the given headers, and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

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(string, object, CancellationToken)

Resolve the given destination name to a destination, convert the payload object to serialized form, possibly using a message converter, wrap it as a message and send it to the resolved destination.

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

Parameters

destinationName string

the destination name to resolve

payload object

the payload to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion

ConvertSendAndReceiveAsync<T>(string, object, IMessagePostProcessor, CancellationToken)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message, apply the post process, and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual Task<T> ConvertSendAndReceiveAsync<T>(string destinationName, object request, IMessagePostProcessor requestPostProcessor, CancellationToken cancellationToken = default)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

requestPostProcessor IMessagePostProcessor

post process for the request message

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the reply

ConvertSendAndReceiveAsync<T>(string, object, IDictionary<string, object>, IMessagePostProcessor, CancellationToken)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message with the given headers, apply the post process, and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual Task<T> ConvertSendAndReceiveAsync<T>(string destinationName, object request, IDictionary<string, object> headers, IMessagePostProcessor requestPostProcessor, CancellationToken cancellationToken = default)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

headers IDictionary<string, object>

the headers to include in the message

requestPostProcessor IMessagePostProcessor

post process for the request message

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the reply

ConvertSendAndReceiveAsync<T>(string, object, IDictionary<string, object>, CancellationToken)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message with the given headers and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual Task<T> ConvertSendAndReceiveAsync<T>(string destinationName, object request, IDictionary<string, object> headers, CancellationToken cancellationToken = default)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

headers IDictionary<string, object>

the headers to include in the message

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the reply

ConvertSendAndReceiveAsync<T>(string, object, CancellationToken)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual Task<T> ConvertSendAndReceiveAsync<T>(string destinationName, object request, CancellationToken cancellationToken = default)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the reply

ConvertSendAndReceive<T>(string, object)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual T ConvertSendAndReceive<T>(string destinationName, object request)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

Returns

T

the converted payload of the reply message, possibly null

Type Parameters

T

the type of the reply

ConvertSendAndReceive<T>(string, object, IMessagePostProcessor)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message, apply the post process, and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual T ConvertSendAndReceive<T>(string destinationName, object request, IMessagePostProcessor requestPostProcessor)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

requestPostProcessor IMessagePostProcessor

post process for the request message

Returns

T

the converted payload of the reply message, possibly null

Type Parameters

T

the type of the reply

ConvertSendAndReceive<T>(string, object, IDictionary<string, object>)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message with the given headers and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual T ConvertSendAndReceive<T>(string destinationName, object request, IDictionary<string, object> headers)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

headers IDictionary<string, object>

the headers to include in the message

Returns

T

the converted payload of the reply message, possibly null

Type Parameters

T

the type of the reply

ConvertSendAndReceive<T>(string, object, IDictionary<string, object>, IMessagePostProcessor)

Resolve the given destination name, convert the payload request object to serialized form, possibly using a message converter and then wrap it as a message with the given headers, apply the post process, and send it to the resolved destination, receive a reply and convert its body to the specified target type.

public virtual T ConvertSendAndReceive<T>(string destinationName, object request, IDictionary<string, object> headers, IMessagePostProcessor requestPostProcessor)

Parameters

destinationName string

the name of the target destination

request object

the payload for the request message

headers IDictionary<string, object>

the headers to include in the message

requestPostProcessor IMessagePostProcessor

post process for the request message

Returns

T

the converted payload of the reply message, possibly null

Type Parameters

T

the type of the reply

Receive(string)

Resolve the given destination and receive a message from it

public virtual IMessage Receive(string destinationName)

Parameters

destinationName string

the destination name to resolve

Returns

IMessage

the received message

ReceiveAndConvertAsync<T>(string, CancellationToken)

Resolve the given destination, receive a message from it, convert the payload to the specified target type

public virtual Task<T> ReceiveAndConvertAsync<T>(string destinationName, CancellationToken cancellationToken = default)

Parameters

destinationName string

the destination name to resolve

cancellationToken CancellationToken

a token used to cancel the operation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the target type

ReceiveAndConvert<T>(string)

Resolve the given destination, receive a message from it, convert the payload to the specified target type

public virtual T ReceiveAndConvert<T>(string destinationName)

Parameters

destinationName string

the destination name to resolve

Returns

T

the received message

Type Parameters

T

the target type

ReceiveAsync(string, CancellationToken)

Resolve the given destination and receive a message from it

public virtual Task<IMessage> ReceiveAsync(string destinationName, CancellationToken cancellationToken = default)

Parameters

destinationName string

the destination name to resolve

cancellationToken CancellationToken

a token used to cancel the operation

Returns

Task<IMessage>

a task to signal completion

ResolveDestination(string)

protected D ResolveDestination(string destinationName)

Parameters

destinationName string

Returns

D

Send(string, IMessage)

Resolve the given destination name to a destination and send a message to it.

public virtual void Send(string destinationName, IMessage message)

Parameters

destinationName string

the destination name to resolve

message IMessage

the message to send

SendAndReceive(string, IMessage)

Resolve the given destination name to a destination and send the given message, receive a reply and return it.

public virtual IMessage SendAndReceive(string destinationName, IMessage requestMessage)

Parameters

destinationName string

the name of the target destination

requestMessage IMessage

the message to send

Returns

IMessage

the received message or null if nothing received

SendAndReceiveAsync(string, IMessage, CancellationToken)

Resolve the given destination name to a destination and send the given message, receive a reply and return it.

public virtual Task<IMessage> SendAndReceiveAsync(string destinationName, IMessage requestMessage, CancellationToken cancellationToken = default)

Parameters

destinationName string

the name of the target destination

requestMessage IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<IMessage>

a task to signal completion

SendAsync(string, IMessage, CancellationToken)

Resolve the given destination name to a destination and send a message to it.

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

Parameters

destinationName string

the destination name to resolve

message IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task

a task to signal completion