C# Класс StompNet.IO.StompFrameWriterWithConfirmation

A wrapper of an IStompFrameWriter (plus an IStompFrameObservable) that waits for the receipt confirmation frame before returning. If a receipt message is not received, the message is re-send in intervals of 30 seconds. The default retry interval can be changed at the constructor. This wrapper also handles the case for connect and connected frames. As the second one is the confirmation of the first one. Receipt header "~connect" is reserved. (quotation marks for clarification). Receipt headers should not be reused. It may produce unexpected results. The receipt header is assumed to already come with the frame to be written on the stream.
Наследование: IStompFrameWriter
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
DefRetryInterval System.TimeSpan

Открытые методы

Метод Описание
Dispose ( ) : void
StompFrameWriterWithConfirmation ( IStompFrameWriter writer, IStompFrameObservable frameObservable, System.TimeSpan retryInterval = null ) : System

Constructor.

WriteAsync ( Frame frame, CancellationToken cancellationToken ) : Task

Write a frame and wait for its receipt frame before returning. This method does not add a receipt header if it is not included already. If the receipt header is not in the frame headers then it returns after sending the message.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
OnCompleted ( ) : void
OnError ( Exception error ) : void
OnNext ( Frame frame ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

StompFrameWriterWithConfirmation() публичный Метод

Constructor.
public StompFrameWriterWithConfirmation ( IStompFrameWriter writer, IStompFrameObservable frameObservable, System.TimeSpan retryInterval = null ) : System
writer IStompFrameWriter Frame writer.
frameObservable IStompFrameObservable Frame observable to be used to receive the confirmations.
retryInterval System.TimeSpan When sending messages that requires receipt confirmation, /// this interval specifies how much time to wait before sending the frame again if /// no receipt is received.
Результат System

WriteAsync() публичный Метод

Write a frame and wait for its receipt frame before returning. This method does not add a receipt header if it is not included already. If the receipt header is not in the frame headers then it returns after sending the message.
public WriteAsync ( Frame frame, CancellationToken cancellationToken ) : Task
frame StompNet.Models.Frames.Frame
cancellationToken System.Threading.CancellationToken
Результат Task

Описание свойств

DefRetryInterval публичное статическое свойство

public static TimeSpan,System DefRetryInterval
Результат System.TimeSpan