C# Class StompSharp.ReceiptBehavior

An IReceiptBehavior that adds a Receipt Header for every outgoing message and wait for the server to send receipt to that message. Create only one instance of this behavior for every destination that you want to use it with.
Inheritance: IReceiptBehavior
ファイルを表示 Open project: Code-Sharp/StompSharp Class Usage Examples

Public Methods

Method Description
DecorateMessage ( IOutgoingMessage message ) : IOutgoingMessage

Decorates the given message with a ReceiptHeaderDecorator.

DecorateSendMessageTask ( Task sendMessageTask ) : Task

Returns a new task that is continued only when the receipt is received.

Dispose ( ) : void
ReceiptBehavior ( string destination, IMessageRouter messageRouter ) : System

Creates an instance of a ReceiptBehavior for the given destination.

Private Methods

Method Description
OnReceiptReceived ( IMessage receiptMessage ) : void

Method Details

DecorateMessage() public method

Decorates the given message with a ReceiptHeaderDecorator.
public DecorateMessage ( IOutgoingMessage message ) : IOutgoingMessage
message IOutgoingMessage
return IOutgoingMessage

DecorateSendMessageTask() public method

Returns a new task that is continued only when the receipt is received.
public DecorateSendMessageTask ( Task sendMessageTask ) : Task
sendMessageTask Task
return Task

Dispose() public method

public Dispose ( ) : void
return void

ReceiptBehavior() public method

Creates an instance of a ReceiptBehavior for the given destination.
public ReceiptBehavior ( string destination, IMessageRouter messageRouter ) : System
destination string The outgoing messages destination
messageRouter IMessageRouter The incomming messages router (To listen for Receipt messages).
return System