Interface IBrokeredMessageBuilder
Interface for brokered message builder.
Namespace: Kephas.Messaging.Distributed
Assembly: Kephas.Messaging.dll
Syntax
[AppServiceContract]
public interface IBrokeredMessageBuilder
Properties
| Improve this Doc View SourceBrokeredMessage
Gets the brokered message.
Declaration
IBrokeredMessage BrokeredMessage { get; }
Property Value
Type | Description |
---|---|
IBrokeredMessage | The brokered message. |
Methods
| Improve this Doc View SourceOf(IBrokeredMessage)
Sets the given brokered message for building.
Declaration
IBrokeredMessageBuilder Of(IBrokeredMessage brokeredMessage)
Parameters
Type | Name | Description |
---|---|---|
IBrokeredMessage | brokeredMessage | The brokered message. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
OneWay()
Makes the communication one way.
Declaration
IBrokeredMessageBuilder OneWay()
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
ReplyTo(IBrokeredMessage)
Makes the message as a reply to another message.
Declaration
IBrokeredMessageBuilder ReplyTo(IBrokeredMessage message)
Parameters
Type | Name | Description |
---|---|---|
IBrokeredMessage | message | The message to reply to. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | A BrokeredMessageBuilder. |
ReplyTo(String, IEndpoint[])
Makes the message as a reply to another message.
Declaration
IBrokeredMessageBuilder ReplyTo(string messageId, params IEndpoint[] recipients)
Parameters
Type | Name | Description |
---|---|---|
System.String | messageId | Identifier for the message. |
IEndpoint[] | recipients | A variable-length parameters list containing recipients. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | A BrokeredMessageBuilder. |
Timeout(TimeSpan)
Sets the timeout when waiting for an answer.
Declaration
IBrokeredMessageBuilder Timeout(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
System.TimeSpan | timeout | The timeout. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | A BrokeredMessageBuilder. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the timeout is negative. |
UseChannel(String)
Sets the channel to use.
Declaration
IBrokeredMessageBuilder UseChannel(string channel)
Parameters
Type | Name | Description |
---|---|---|
System.String | channel | The channel. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithContent(IMessage)
Sets the content message.
Declaration
IBrokeredMessageBuilder WithContent(IMessage message)
Parameters
Type | Name | Description |
---|---|---|
IMessage | message | The message. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithRecipients(IEndpoint[])
Sets the recipients to the brokered message.
Declaration
IBrokeredMessageBuilder WithRecipients(params IEndpoint[] recipients)
Parameters
Type | Name | Description |
---|---|---|
IEndpoint[] | recipients | The recipients. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithRecipients(IEnumerable<IEndpoint>)
Sets the recipients to the brokered message.
Declaration
IBrokeredMessageBuilder WithRecipients(IEnumerable<IEndpoint> recipients)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IEndpoint> | recipients | The recipients. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithSender(IEndpoint)
Sets the sender of the brokered message.
Declaration
IBrokeredMessageBuilder WithSender(IEndpoint sender)
Parameters
Type | Name | Description |
---|---|---|
IEndpoint | sender | The message sender. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithSender(String)
Sets the sender of the brokered message.
Declaration
IBrokeredMessageBuilder WithSender(string senderId)
Parameters
Type | Name | Description |
---|---|---|
System.String | senderId | The ID of the message sender. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |
WithSender(Uri)
Sets the sender of the brokered message.
Declaration
IBrokeredMessageBuilder WithSender(Uri sender)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | sender | The message sender. |
Returns
Type | Description |
---|---|
IBrokeredMessageBuilder | This IBrokeredMessageBuilder. |