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
loggerILogger
Properties
ArgumentResolvers
public virtual IList<IHandlerMethodArgumentResolver> ArgumentResolvers { get; set; }
Property Value
CustomArgumentResolvers
public virtual IList<IHandlerMethodArgumentResolver> CustomArgumentResolvers { get; set; }
Property Value
CustomReturnValueHandlers
public virtual IList<IHandlerMethodReturnValueHandler> CustomReturnValueHandlers { get; set; }
Property Value
DestinationPrefixes
public virtual IList<string> DestinationPrefixes { get; set; }
Property Value
HandlerMethods
public virtual IDictionary<T, HandlerMethod> HandlerMethods { get; }
Property Value
MethodArgumentResolvers
protected HandlerMethodArgumentResolverComposite MethodArgumentResolvers { get; }
Property Value
MethodReturnValueHandlers
protected HandlerMethodReturnValueHandlerComposite MethodReturnValueHandlers { get; }
Property Value
ReturnValueHandlers
public virtual IList<IHandlerMethodReturnValueHandler> ReturnValueHandlers { get; set; }
Property Value
ServiceName
public virtual string ServiceName { get; set; }
Property Value
Methods
CreateExceptionHandlerMethodResolverFor(Type)
protected abstract AbstractExceptionHandlerMethodResolver CreateExceptionHandlerMethodResolverFor(Type beanType)
Parameters
beanTypeType
Returns
CreateHandlerMethod(object, MethodInfo)
protected virtual HandlerMethod CreateHandlerMethod(object handler, MethodInfo method)
Parameters
handlerobjectmethodMethodInfo
Returns
DetectHandlerMethods(object)
protected void DetectHandlerMethods(object handler)
Parameters
handlerobject
GetDestination(IMessage)
protected abstract string GetDestination(IMessage message)
Parameters
messageIMessage
Returns
GetDirectLookupDestinations(T)
protected abstract ISet<string> GetDirectLookupDestinations(T mapping)
Parameters
mappingT
Returns
GetExceptionHandlerMethod(HandlerMethod, Exception)
protected virtual InvocableHandlerMethod GetExceptionHandlerMethod(HandlerMethod handlerMethod, Exception exception)
Parameters
handlerMethodHandlerMethodexceptionException
Returns
GetLookupDestination(string)
protected virtual string GetLookupDestination(string destination)
Parameters
destinationstring
Returns
GetMappingComparer(IMessage)
protected abstract IComparer<T> GetMappingComparer(IMessage message)
Parameters
messageIMessage
Returns
- IComparer<T>
GetMappingForMethod(MethodInfo, Type)
protected abstract T GetMappingForMethod(MethodInfo method, Type handlerType)
Parameters
methodMethodInfohandlerTypeType
Returns
- T
GetMatchingMapping(T, IMessage)
protected abstract T GetMatchingMapping(T mapping, IMessage message)
Parameters
mappingTmessageIMessage
Returns
- T
HandleMatch(T, HandlerMethod, string, IMessage)
protected virtual void HandleMatch(T mapping, HandlerMethod handlerMethod, string lookupDestination, IMessage message)
Parameters
mappingThandlerMethodHandlerMethodlookupDestinationstringmessageIMessage
HandleMessage(IMessage)
Handle the given method
public virtual void HandleMessage(IMessage message)
Parameters
messageIMessagethe message to process
HandleMessageInternal(IMessage, string)
protected virtual void HandleMessageInternal(IMessage message, string lookupDestination)
Parameters
HandleNoMatch(ICollection<T>, string, IMessage)
protected virtual Task HandleNoMatch(ICollection<T> ts, string lookupDestination, IMessage message)
Parameters
tsICollection<T>lookupDestinationstringmessageIMessage
Returns
InitArgumentResolvers()
protected abstract IList<IHandlerMethodArgumentResolver> InitArgumentResolvers()
Returns
InitReturnValueHandlers()
protected abstract IList<IHandlerMethodReturnValueHandler> InitReturnValueHandlers()
Returns
ProcessHandlerMethodException(HandlerMethod, Exception, IMessage)
protected virtual void ProcessHandlerMethodException(HandlerMethod handlerMethod, Exception exception, IMessage message)
Parameters
handlerMethodHandlerMethodexceptionExceptionmessageIMessage
RegisterHandlerMethod(object, MethodInfo, T)
protected virtual void RegisterHandlerMethod(object handler, MethodInfo method, T mapping)
Parameters
handlerobjectmethodMethodInfomappingT
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.