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
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
beanType
Type
Returns
CreateHandlerMethod(object, MethodInfo)
protected virtual HandlerMethod CreateHandlerMethod(object handler, MethodInfo method)
Parameters
handler
objectmethod
MethodInfo
Returns
DetectHandlerMethods(object)
protected void DetectHandlerMethods(object handler)
Parameters
handler
object
GetDestination(IMessage)
protected abstract string GetDestination(IMessage message)
Parameters
message
IMessage
Returns
GetDirectLookupDestinations(T)
protected abstract ISet<string> GetDirectLookupDestinations(T mapping)
Parameters
mapping
T
Returns
GetExceptionHandlerMethod(HandlerMethod, Exception)
protected virtual InvocableHandlerMethod GetExceptionHandlerMethod(HandlerMethod handlerMethod, Exception exception)
Parameters
handlerMethod
HandlerMethodexception
Exception
Returns
GetLookupDestination(string)
protected virtual string GetLookupDestination(string destination)
Parameters
destination
string
Returns
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
MethodInfohandlerType
Type
Returns
- T
GetMatchingMapping(T, IMessage)
protected abstract T GetMatchingMapping(T mapping, IMessage message)
Parameters
mapping
Tmessage
IMessage
Returns
- T
HandleMatch(T, HandlerMethod, string, IMessage)
protected virtual void HandleMatch(T mapping, HandlerMethod handlerMethod, string lookupDestination, IMessage message)
Parameters
mapping
ThandlerMethod
HandlerMethodlookupDestination
stringmessage
IMessage
HandleMessage(IMessage)
Handle the given method
public virtual void HandleMessage(IMessage message)
Parameters
message
IMessagethe 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
ts
ICollection<T>lookupDestination
stringmessage
IMessage
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
handlerMethod
HandlerMethodexception
Exceptionmessage
IMessage
RegisterHandlerMethod(object, MethodInfo, T)
protected virtual void RegisterHandlerMethod(object handler, MethodInfo method, T mapping)
Parameters
handler
objectmethod
MethodInfomapping
T
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.