Class QueryHandler
Message handler for QueryMessage.
Inheritance
System.Object
QueryHandler
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.Endpoints
Assembly: Kephas.Data.Endpoints.dll
Syntax
public class QueryHandler : MessageHandlerBase<QueryMessage, QueryResponseMessage>, ILoggable, IMessageHandler<QueryMessage>, IMessageHandler, IDisposable
Constructors
| Improve this Doc View SourceQueryHandler(ICompositionContext, IClientQueryExecutor)
Initializes a new instance of the QueryHandler class.
Declaration
public QueryHandler(ICompositionContext compositionContext, IClientQueryExecutor clientQueryExecutor)
Parameters
Type | Name | Description |
---|---|---|
ICompositionContext | compositionContext | The dependency injection/composition context. |
IClientQueryExecutor | clientQueryExecutor | The client query executor. |
Methods
| Improve this Doc View SourceCreateClientQueryExecutionContext(QueryMessage, IMessagingContext)
Creates client query execution context.
Declaration
protected virtual IClientQueryExecutionContext CreateClientQueryExecutionContext(QueryMessage message, IMessagingContext context)
Parameters
Type | Name | Description |
---|---|---|
QueryMessage | message | The message to be handled. |
IMessagingContext | context | The processing context. |
Returns
Type | Description |
---|---|
IClientQueryExecutionContext | The new client query execution context. |
ProcessAsync(QueryMessage, IMessagingContext, CancellationToken)
Processes the provided message asynchronously and returns a response promise.
Declaration
public override Task<QueryResponseMessage> ProcessAsync(QueryMessage message, IMessagingContext context, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
QueryMessage | message | The message to be handled. |
IMessagingContext | context | The processing context. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<QueryResponseMessage> | The response promise. |
Overrides
Kephas.Messaging.MessageHandlerBase<Kephas.Data.Endpoints.QueryMessage, Kephas.Data.Endpoints.QueryResponseMessage>.ProcessAsync(Kephas.Data.Endpoints.QueryMessage, Kephas.Messaging.IMessagingContext, System.Threading.CancellationToken)
Implements
System.IDisposable