public class HandlerAdapter extends Object
InvocableHandlerMethod or
DelegatingInvocableHandler. All methods delegate to the
underlying handler.| Constructor and Description |
|---|
HandlerAdapter(DelegatingInvocableHandler delegatingHandler)
Construct an instance with the provided delegating handler.
|
HandlerAdapter(InvocableHandlerMethod invokerHandlerMethod)
Construct an instance with the provided method.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getBean()
Get the bean from the handler method.
|
InvocationResult |
getInvocationResultFor(Object result,
Object inboundPayload)
Build an
InvocationResult for the result and inbound payload. |
String |
getMethodAsString(Object payload)
Get the method signature for the payload type via
Method.toGenericString(). |
Method |
getMethodFor(Object payload)
Get the method for the payload type.
|
Type |
getReturnTypeFor(Object payload)
Return the return type for the method that will be chosen for this payload.
|
InvocationResult |
invoke(Message<?> message,
Object... providedArgs)
Invoke the appropriate method for the payload.
|
public HandlerAdapter(InvocableHandlerMethod invokerHandlerMethod)
invokerHandlerMethod - the method.public HandlerAdapter(DelegatingInvocableHandler delegatingHandler)
delegatingHandler - the handler.public InvocationResult invoke(@Nullable Message<?> message, Object... providedArgs) throws Exception
message - the message.providedArgs - additional arguments.Exception - if one occurs.public String getMethodAsString(Object payload)
Method.toGenericString().payload - the payload.public Method getMethodFor(Object payload)
payload - the payload.public Type getReturnTypeFor(Object payload)
payload - the payload.public Object getBean()
@Nullable public InvocationResult getInvocationResultFor(Object result, Object inboundPayload)
InvocationResult for the result and inbound payload.result - the result.inboundPayload - the payload.