Table of Contents

Class AbstractPollableChannel

Namespace
Steeltoe.Integration.Channel
Assembly
Steeltoe.Integration.IntegrationBase.dll
public abstract class AbstractPollableChannel : AbstractMessageChannel, IPollableChannel, IMessageChannel, IServiceNameAware, ITaskSchedulerChannelInterceptorAware, IChannelInterceptorAware
Inheritance
AbstractPollableChannel
Implements
Derived
Inherited Members

Constructors

AbstractPollableChannel(IApplicationContext, ILogger)

protected AbstractPollableChannel(IApplicationContext context, ILogger logger = null)

Parameters

context IApplicationContext
logger ILogger

AbstractPollableChannel(IApplicationContext, string, ILogger)

protected AbstractPollableChannel(IApplicationContext context, string name, ILogger logger = null)

Parameters

context IApplicationContext
name string
logger ILogger

Properties

ChannelInterceptors

Gets or sets the channel interceptors

public override List<IChannelInterceptor> ChannelInterceptors { get; set; }

Property Value

List<IChannelInterceptor>

HasTaskSchedulerInterceptors

Gets a value indicating whether there are any task scheduler interceptors on the channel

public virtual bool HasTaskSchedulerInterceptors { get; }

Property Value

bool

TaskSchedulerInterceptorsSize

public int TaskSchedulerInterceptorsSize { get; }

Property Value

int

Methods

AddInterceptor(IChannelInterceptor)

Add a interceptor to the channel

public override void AddInterceptor(IChannelInterceptor interceptor)

Parameters

interceptor IChannelInterceptor

the interceptor

AddInterceptor(int, IChannelInterceptor)

Add an interceptor to the channel at the specified index

public override void AddInterceptor(int index, IChannelInterceptor interceptor)

Parameters

index int

the index to add the interceptor at

interceptor IChannelInterceptor

the interceptor

DoReceive(int)

protected virtual IMessage DoReceive(int timeout)

Parameters

timeout int

Returns

IMessage

DoReceive(CancellationToken)

protected virtual IMessage DoReceive(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

IMessage

DoReceiveInternal(CancellationToken)

protected abstract IMessage DoReceiveInternal(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

IMessage

Receive()

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

public virtual 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 virtual 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 virtual ValueTask<IMessage> ReceiveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

token used to signal cancelation

Returns

ValueTask<IMessage>

a task to signal completion

RemoveInterceptor(IChannelInterceptor)

Remove an intercetptor from the channel

public override bool RemoveInterceptor(IChannelInterceptor interceptor)

Parameters

interceptor IChannelInterceptor

the interceptor

Returns

bool

succss or failure

RemoveInterceptor(int)

Remove an interceptor at the specified index

public override IChannelInterceptor RemoveInterceptor(int index)

Parameters

index int

the index

Returns

IChannelInterceptor

removed interceptor