Class EndpointMiddleware<TRequest, TResponse>
- Namespace
- Steeltoe.Management.Endpoint.Middleware
- Assembly
- Steeltoe.Management.Endpoint.dll
public abstract class EndpointMiddleware<TRequest, TResponse> : IEndpointMiddleware, IMiddleware
Type Parameters
TRequest
TResponse
- Inheritance
-
EndpointMiddleware<TRequest, TResponse>
- Implements
- Inherited Members
Constructors
EndpointMiddleware(IEndpointHandler<TRequest, TResponse>, IOptionsMonitor<ManagementOptions>, ILoggerFactory)
protected EndpointMiddleware(IEndpointHandler<TRequest, TResponse> endpointHandler, IOptionsMonitor<ManagementOptions> managementOptionsMonitor, ILoggerFactory loggerFactory)
Parameters
endpointHandler
IEndpointHandler<TRequest, TResponse>managementOptionsMonitor
IOptionsMonitor<ManagementOptions>loggerFactory
ILoggerFactory
Properties
EndpointHandler
protected IEndpointHandler<TRequest, TResponse> EndpointHandler { get; }
Property Value
- IEndpointHandler<TRequest, TResponse>
EndpointOptions
public EndpointOptions EndpointOptions { get; }
Property Value
ManagementOptionsMonitor
protected IOptionsMonitor<ManagementOptions> ManagementOptionsMonitor { get; }
Property Value
Methods
CanInvoke(PathString)
public virtual bool CanInvoke(PathString requestPath)
Parameters
requestPath
PathString
Returns
GetMetadataProvider()
public virtual ActuatorMetadataProvider GetMetadataProvider()
Returns
InvokeAsync(HttpContext, RequestDelegate?)
Request handling method.
public Task InvokeAsync(HttpContext context, RequestDelegate? next)
Parameters
context
HttpContextThe HttpContext for the current request.
next
RequestDelegateThe delegate representing the remaining middleware in the request pipeline.
Returns
InvokeEndpointHandlerAsync(TRequest?, CancellationToken)
protected abstract Task<TResponse> InvokeEndpointHandlerAsync(TRequest? request, CancellationToken cancellationToken)
Parameters
request
TRequestcancellationToken
CancellationToken
Returns
- Task<TResponse>
ParseRequestAsync(HttpContext, CancellationToken)
protected virtual Task<TRequest?> ParseRequestAsync(HttpContext httpContext, CancellationToken cancellationToken)
Parameters
httpContext
HttpContextcancellationToken
CancellationToken
Returns
- Task<TRequest>
WriteResponseAsync(TResponse, HttpContext, CancellationToken)
protected virtual Task WriteResponseAsync(TResponse response, HttpContext httpContext, CancellationToken cancellationToken)
Parameters
response
TResponsehttpContext
HttpContextcancellationToken
CancellationToken