Table of Contents

Class AbstractMethodMessageHandler<T>

Namespace
Steeltoe.Messaging.Handler.Invocation
Assembly
Steeltoe.Messaging.MessagingBase.dll
public abstract class AbstractMethodMessageHandler<T> : IMessageHandler, IServiceNameAware

Type Parameters

T
Inheritance
AbstractMethodMessageHandler<T>
Implements
Inherited Members

Constructors

AbstractMethodMessageHandler(ILogger)

protected AbstractMethodMessageHandler(ILogger logger = null)

Parameters

logger ILogger

Properties

ArgumentResolvers

public virtual IList<IHandlerMethodArgumentResolver> ArgumentResolvers { get; set; }

Property Value

IList<IHandlerMethodArgumentResolver>

CustomArgumentResolvers

public virtual IList<IHandlerMethodArgumentResolver> CustomArgumentResolvers { get; set; }

Property Value

IList<IHandlerMethodArgumentResolver>

CustomReturnValueHandlers

public virtual IList<IHandlerMethodReturnValueHandler> CustomReturnValueHandlers { get; set; }

Property Value

IList<IHandlerMethodReturnValueHandler>

DestinationPrefixes

public virtual IList<string> DestinationPrefixes { get; set; }

Property Value

IList<string>

HandlerMethods

public virtual IDictionary<T, HandlerMethod> HandlerMethods { get; }

Property Value

IDictionary<T, HandlerMethod>

MethodArgumentResolvers

protected HandlerMethodArgumentResolverComposite MethodArgumentResolvers { get; }

Property Value

HandlerMethodArgumentResolverComposite

MethodReturnValueHandlers

protected HandlerMethodReturnValueHandlerComposite MethodReturnValueHandlers { get; }

Property Value

HandlerMethodReturnValueHandlerComposite

ReturnValueHandlers

public virtual IList<IHandlerMethodReturnValueHandler> ReturnValueHandlers { get; set; }

Property Value

IList<IHandlerMethodReturnValueHandler>

ServiceName

public virtual string ServiceName { get; set; }

Property Value

string

Methods

CreateExceptionHandlerMethodResolverFor(Type)

protected abstract AbstractExceptionHandlerMethodResolver CreateExceptionHandlerMethodResolverFor(Type beanType)

Parameters

beanType Type

Returns

AbstractExceptionHandlerMethodResolver

CreateHandlerMethod(object, MethodInfo)

protected virtual HandlerMethod CreateHandlerMethod(object handler, MethodInfo method)

Parameters

handler object
method MethodInfo

Returns

HandlerMethod

DetectHandlerMethods(object)

protected void DetectHandlerMethods(object handler)

Parameters

handler object

GetDestination(IMessage)

protected abstract string GetDestination(IMessage message)

Parameters

message IMessage

Returns

string

GetDirectLookupDestinations(T)

protected abstract ISet<string> GetDirectLookupDestinations(T mapping)

Parameters

mapping T

Returns

ISet<string>

GetExceptionHandlerMethod(HandlerMethod, Exception)

protected virtual InvocableHandlerMethod GetExceptionHandlerMethod(HandlerMethod handlerMethod, Exception exception)

Parameters

handlerMethod HandlerMethod
exception Exception

Returns

InvocableHandlerMethod

GetLookupDestination(string)

protected virtual string GetLookupDestination(string destination)

Parameters

destination string

Returns

string

GetMappingComparer(IMessage)

protected abstract IComparer<T> GetMappingComparer(IMessage message)

Parameters

message IMessage

Returns

IComparer<T>

GetMappingForMethod(MethodInfo, Type)

protected abstract T GetMappingForMethod(MethodInfo method, Type handlerType)

Parameters

method MethodInfo
handlerType Type

Returns

T

GetMatchingMapping(T, IMessage)

protected abstract T GetMatchingMapping(T mapping, IMessage message)

Parameters

mapping T
message IMessage

Returns

T

HandleMatch(T, HandlerMethod, string, IMessage)

protected virtual void HandleMatch(T mapping, HandlerMethod handlerMethod, string lookupDestination, IMessage message)

Parameters

mapping T
handlerMethod HandlerMethod
lookupDestination string
message IMessage

HandleMessage(IMessage)

Handle the given method

public virtual void HandleMessage(IMessage message)

Parameters

message IMessage

the message to process

HandleMessageInternal(IMessage, string)

protected virtual void HandleMessageInternal(IMessage message, string lookupDestination)

Parameters

message IMessage
lookupDestination string

HandleNoMatch(ICollection<T>, string, IMessage)

protected virtual Task HandleNoMatch(ICollection<T> ts, string lookupDestination, IMessage message)

Parameters

ts ICollection<T>
lookupDestination string
message IMessage

Returns

Task

InitArgumentResolvers()

protected abstract IList<IHandlerMethodArgumentResolver> InitArgumentResolvers()

Returns

IList<IHandlerMethodArgumentResolver>

InitReturnValueHandlers()

protected abstract IList<IHandlerMethodReturnValueHandler> InitReturnValueHandlers()

Returns

IList<IHandlerMethodReturnValueHandler>

ProcessHandlerMethodException(HandlerMethod, Exception, IMessage)

protected virtual void ProcessHandlerMethodException(HandlerMethod handlerMethod, Exception exception, IMessage message)

Parameters

handlerMethod HandlerMethod
exception Exception
message IMessage

RegisterHandlerMethod(object, MethodInfo, T)

protected virtual void RegisterHandlerMethod(object handler, MethodInfo method, T mapping)

Parameters

handler object
method MethodInfo
mapping T

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.