public final class MethodMessageHandler extends AbstractMessageHandler
MethodMessageHandlerInspector).| Modifier and Type | Method and Description | 
|---|---|
| static MethodMessageHandler | createFor(Method method,
         Class<?> explicitPayloadType,
         ParameterResolverFactory parameterResolverFactory)Creates a MethodMessageHandler for the given  method, using givenexplicitPayloadType(if notnull) defining the payload of the message it supports. | 
| boolean | equals(Object o) | 
| <T extends Annotation>  | getAnnotation(Class<T> annotationType)Returns the member-level annotation of given  annotationType, ornullif 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  targetinstance, using the givenmessageas
 source object to provide parameter values. | 
| String | toString() | 
compareTo, findResolvers, getParameterValueResolvers, getPayloadType, matchespublic static MethodMessageHandler createFor(Method method, Class<?> explicitPayloadType, ParameterResolverFactory parameterResolverFactory)
method, using given explicitPayloadType
 (if not null) defining the payload of the message it supports. If null, the payload
 type is deducted from the first parameter of the method.method - The method to create a Handler forexplicitPayloadType - The payload type explicitly defined on the method, or nullparameterResolverFactory - The strategy for resolving parameter values of handler methodsUnsupportedHandlerException - if the given method is not suitable as a Handlerpublic Object invoke(Object target, Message message) throws InvocationTargetException, IllegalAccessException
AbstractMessageHandlertarget instance, using the given message as
 source object to provide parameter values.invoke in class AbstractMessageHandlertarget - 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)
AbstractMessageHandlerannotationType, or null if no such
 annotation is present.getAnnotation in class AbstractMessageHandlerT - 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 AbstractMessageHandlerpublic int hashCode()
hashCode in class AbstractMessageHandlerCopyright © 2010-2014. All Rights Reserved.