public final class MethodMessageHandler extends AbstractMessageHandler
MethodMessageHandlerInspector
).Modifier and Type | Method and Description |
---|---|
static MethodMessageHandler |
createFor(Method method)
Creates a MethodMessageHandler for the given
method . |
boolean |
equals(Object o) |
<T extends Annotation> |
getAnnotation(Class<T> annotationType)
Returns the member-level annotation of given
annotationType , or null if no such
annotation is present. |
Method |
getMethod()
Returns the Method backing this handler.
|
String |
getMethodName()
Returns the name of the method backing this handler.
|
int |
hashCode() |
Object |
invoke(Object target,
Message message)
Invokes this handler for the given
target instance, using the given message as
source object to provide parameter values. |
String |
toString() |
compareTo, findResolvers, getParameterValueResolvers, getPayloadType, matches
public static MethodMessageHandler createFor(Method method)
method
.method
- The method to create a Handler forUnsupportedHandlerException
- if the given method is not suitable as a Handlerpublic Object invoke(Object target, Message message) throws InvocationTargetException, IllegalAccessException
AbstractMessageHandler
target
instance, using the given message
as
source object to provide parameter values.invoke
in class AbstractMessageHandler
target
- The target instance to invoke the Handler on.message
- The message providing parameter valuesInvocationTargetException
- when the handler throws a checked exceptionIllegalAccessException
- if the SecurityManager refuses the handler invocationpublic <T extends Annotation> T getAnnotation(Class<T> annotationType)
AbstractMessageHandler
annotationType
, or null
if no such
annotation is present.getAnnotation
in class AbstractMessageHandler
T
- The type of annotation to retrieveannotationType
- The type of annotation to retrievenull
if no such annotation is present.public String getMethodName()
public Method getMethod()
public boolean equals(Object o)
equals
in class AbstractMessageHandler
public int hashCode()
hashCode
in class AbstractMessageHandler
Copyright © 2010-2013. All Rights Reserved.