Class MessageHandlerSelectorBase
Base class for message handler selectors.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Messaging.HandlerSelectors
Assembly: Kephas.Messaging.dll
Syntax
public abstract class MessageHandlerSelectorBase : IMessageHandlerSelector
Constructors
| Improve this Doc View SourceMessageHandlerSelectorBase(IMessageMatchService)
Initializes a new instance of the Message
Declaration
protected MessageHandlerSelectorBase(IMessageMatchService messageMatchService)
Parameters
Type | Name | Description |
---|---|---|
IMessage |
messageMatchService | The message match service. |
Properties
| Improve this Doc View SourceMessageMatchService
Gets the message match service.
Declaration
protected IMessageMatchService MessageMatchService { get; }
Property Value
Type | Description |
---|---|
IMessage |
The message match service. |
Methods
| Improve this Doc View SourceCanHandle(Type, Type, Object)
Indicates whether the selector can handle the indicated message type.
Declaration
public abstract bool CanHandle(Type envelopeType, Type messageType, object messageId)
Parameters
Type | Name | Description |
---|---|---|
System. |
envelopeType | The type of the envelope. This is typically the adapter type, if the message does not implement IMessage. |
System. |
messageType | The type of the message. |
System. |
messageId | The ID of the message. |
Returns
Type | Description |
---|---|
System. |
True if the selector can handle the message type, false if not. |
GetHandlersFactory(IEnumerable<IExportFactory<IMessageHandler, MessageHandlerMetadata>>, Type, Type, Object)
Gets a factory which retrieves the components handling messages of the given type.
Declaration
public virtual Func<IEnumerable<IMessageHandler>> GetHandlersFactory(IEnumerable<IExportFactory<IMessageHandler, MessageHandlerMetadata>> handlerFactories, Type envelopeType, Type messageType, object messageId)
Parameters
Type | Name | Description |
---|---|---|
System. |
handlerFactories | The handler factories. |
System. |
envelopeType | The type of the envelope. This is typically the adapter type, if the message does not implement IMessage. |
System. |
messageType | The type of the message. |
System. |
messageId | The ID of the message. |
Returns
Type | Description |
---|---|
System. |
A factory of an enumeration of message handlers. |
GetOrderedMessageHandlerFactories(IEnumerable<IExportFactory<IMessageHandler, MessageHandlerMetadata>>, Type, Type, Object)
Gets the ordered message handler factories.
Declaration
protected virtual IList<IExportFactory<IMessageHandler, MessageHandlerMetadata>> GetOrderedMessageHandlerFactories(IEnumerable<IExportFactory<IMessageHandler, MessageHandlerMetadata>> handlerFactories, Type envelopeType, Type messageType, object messageId)
Parameters
Type | Name | Description |
---|---|---|
System. |
handlerFactories | The handler factories. |
System. |
envelopeType | The type of the envelope. This is typically the adapter type, if the message does not implement IMessage. |
System. |
messageType | The type of the message. |
System. |
messageId | The ID of the message. |
Returns
Type | Description |
---|---|
System. |
The ordered message handler factories. |