Table of Contents

Class AbstractMessageReceivingTemplate<D>

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

Type Parameters

D
Inheritance
AbstractMessageReceivingTemplate<D>
Implements
Derived
Inherited Members

Properties

DefaultReceiveDestination

public virtual D DefaultReceiveDestination { get; set; }

Property Value

D

RequiredDefaultReceiveDestination

protected virtual D RequiredDefaultReceiveDestination { get; }

Property Value

D

ThrowReceivedExceptions

public virtual bool ThrowReceivedExceptions { get; set; }

Property Value

bool

Methods

DoConvert<T>(IMessage)

protected virtual T DoConvert<T>(IMessage message)

Parameters

message IMessage

Returns

T

Type Parameters

T

DoReceive(D)

protected abstract IMessage DoReceive(D destination)

Parameters

destination D

Returns

IMessage

DoReceiveAsync(D, CancellationToken)

protected abstract Task<IMessage> DoReceiveAsync(D destination, CancellationToken cancellationToken)

Parameters

destination D
cancellationToken CancellationToken

Returns

Task<IMessage>

Receive()

Receive a message from a default destination

public virtual IMessage Receive()

Returns

IMessage

the received message; or null

Receive(D)

Receive a message from the given destination

public virtual IMessage Receive(D destination)

Parameters

destination D

the target destination

Returns

IMessage

the received message; or null

ReceiveAndConvertAsync<T>(CancellationToken)

Receive a message from a default destination and convert its payload to the specified target type.

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

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the payload

ReceiveAndConvertAsync<T>(D, CancellationToken)

Receive a message from the given destination and convert its payload to the specified target type.

public virtual Task<T> ReceiveAndConvertAsync<T>(D destination, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<T>

a task to signal completion

Type Parameters

T

the type of the payload

ReceiveAndConvert<T>()

Receive a message from a default destination and convert its payload to the specified target type.

public virtual T ReceiveAndConvert<T>()

Returns

T

the received message; or null

Type Parameters

T

the type of the payload

ReceiveAndConvert<T>(D)

Receive a message from the given destination and convert its payload to the specified target type.

public virtual T ReceiveAndConvert<T>(D destination)

Parameters

destination D

the target destination

Returns

T

the received message; or null

Type Parameters

T

the type of the payload

ReceiveAsync(CancellationToken)

Receive a message from a default destination

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

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<IMessage>

a task to signal completion

ReceiveAsync(D, CancellationToken)

Receive a message from the given destination

public virtual Task<IMessage> ReceiveAsync(D destination, CancellationToken cancellationToken = default)

Parameters

destination D

the target destination

cancellationToken CancellationToken

token used to signal cancelation

Returns

Task<IMessage>

a task to signal completion