Show / Hide Table of Contents

    Class SequenceReaderBase

    The base class for the ISequenceReader implementations. It encapsulates the logic to deal with the ISequenceStore.

    Inheritance
    object
    SequenceReaderBase
    BatchSequenceReader
    ChunkSequenceReader
    Implements
    ISequenceReader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Sequences
    Assembly: Silverback.Integration.dll
    Syntax
    public abstract class SequenceReaderBase : ISequenceReader

    Constructors

    | Improve this doc View source

    SequenceReaderBase(bool)

    Initializes a new instance of the SequenceReaderBase class.

    Declaration
    protected SequenceReaderBase(bool handlesRawMessages = false)
    Parameters
    Type Name Description
    bool handlesRawMessages

    A value indicating whether this reader handles the raw messages, before they are being deserialized, decrypted, etc.

    Properties

    | Improve this doc View source

    HandlesRawMessages

    Gets a value indicating whether this reader handles the raw messages, before they are being deserialized, decrypted, etc.

    Declaration
    public bool HandlesRawMessages { get; }
    Property Value
    Type Description
    bool

    Methods

    | Improve this doc View source

    CanHandleAsync(ConsumerPipelineContext)

    Checks whether this reader can and must handle the message being processed in the specified context.

    Declaration
    public abstract Task<bool> CanHandleAsync(ConsumerPipelineContext context)
    Parameters
    Type Name Description
    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    Task<bool>

    A Task<TResult> representing the asynchronous operation. The task result contains a value indicating whether this reader can and must handle the message.

    | Improve this doc View source

    CreateNewSequenceAsync(string, ConsumerPipelineContext)

    Creates the new sequence and adds it to the store.

    Declaration
    protected virtual Task<ISequence> CreateNewSequenceAsync(string sequenceId, ConsumerPipelineContext context)
    Parameters
    Type Name Description
    string sequenceId

    The sequence identifier.

    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    Task<ISequence>

    The new sequence.

    | Improve this doc View source

    CreateNewSequenceCore(string, ConsumerPipelineContext)

    Creates the new sequence object.

    Declaration
    protected abstract ISequence CreateNewSequenceCore(string sequenceId, ConsumerPipelineContext context)
    Parameters
    Type Name Description
    string sequenceId

    The sequence identifier.

    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    ISequence

    The new sequence.

    | Improve this doc View source

    GetExistingSequenceAsync(ConsumerPipelineContext, string)

    Retrieves the existing incomplete sequence from the store.

    Declaration
    protected virtual Task<ISequence?> GetExistingSequenceAsync(ConsumerPipelineContext context, string sequenceId)
    Parameters
    Type Name Description
    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    string sequenceId

    The sequence identifier.

    Returns
    Type Description
    Task<ISequence>

    The ISequence or null if not found.

    | Improve this doc View source

    GetSequenceAsync(ConsumerPipelineContext)

    Returns the ISequence related to the message being processed.

    Declaration
    public Task<ISequence> GetSequenceAsync(ConsumerPipelineContext context)
    Parameters
    Type Name Description
    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    Task<ISequence>

    A Task<TResult> representing the asynchronous operation. The task result contains the ISequence.

    | Improve this doc View source

    GetSequenceIdAsync(ConsumerPipelineContext)

    Gets the sequence identifier extracted from the current envelope.

    Declaration
    protected virtual Task<string> GetSequenceIdAsync(ConsumerPipelineContext context)
    Parameters
    Type Name Description
    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    Task<string>

    A Task<TResult> representing the asynchronous operation. The task result contains the recognized sequence identifier, or null.

    | Improve this doc View source

    IsNewSequenceAsync(string, ConsumerPipelineContext)

    Determines if the current message correspond with the beginning of a new sequence.

    Declaration
    protected abstract Task<bool> IsNewSequenceAsync(string sequenceId, ConsumerPipelineContext context)
    Parameters
    Type Name Description
    string sequenceId

    The sequence identifier.

    ConsumerPipelineContext context

    The current ConsumerPipelineContext.

    Returns
    Type Description
    Task<bool>

    A Task<TResult> representing the asynchronous operation. The task result contains true if a new sequence is starting; otherwise false.

    Implements

    ISequenceReader
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini