Table of Contents

Class NullChannel

Namespace
Steeltoe.Integration.Channel
Assembly
Steeltoe.Integration.IntegrationBase.dll
public class NullChannel : Channel<IMessage>, IPollableChannel, IMessageChannel, IServiceNameAware
Inheritance
NullChannel
Implements
Inherited Members

Constructors

NullChannel(ILogger)

public NullChannel(ILogger logger = null)

Parameters

logger ILogger

Properties

ServiceName

public string ServiceName { get; set; }

Property Value

string

Methods

Receive()

Receive a message from this channel, blocking forever if necessary.

public IMessage Receive()

Returns

IMessage

the message

Receive(int)

Receive a message from this channel, blocking until either a message is available or the specified timeout period elapses.

public IMessage Receive(int timeout)

Parameters

timeout int

the timeout value in milliseconds

Returns

IMessage

the message or null

ReceiveAsync(CancellationToken)

Receive a message from this channel

public ValueTask<IMessage> ReceiveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

ValueTask<IMessage>

a task to signal completion

Send(IMessage)

Send a message to this channel. If the message is sent successfuly, the method returns true. If the message cannot be sent due to a non-fatal reason, the method returns false. The method may also throw a Exception in case of non-recoverable errors. This method may block indefinitely, depending on the implementation.

public bool Send(IMessage message)

Parameters

message IMessage

the message to send

Returns

bool

true if the message is sent

Send(IMessage, int)

Send a message, blocking until either the message is accepted or the specified timeout period elapses.

public bool Send(IMessage message, int timeout)

Parameters

message IMessage

the message to send

timeout int

the timeout in milliseconds; -1 for no timeout

Returns

bool

true if the message is sent

SendAsync(IMessage, CancellationToken)

Send a message to this channel.

public ValueTask<bool> SendAsync(IMessage message, CancellationToken cancellationToken = default)

Parameters

message IMessage

the message to send

cancellationToken CancellationToken

token used to signal cancellation

Returns

ValueTask<bool>

a task to signal completion