public class HandlerAdapter
extends java.lang.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(org.springframework.messaging.handler.invocation.InvocableHandlerMethod invokerHandlerMethod)
Construct an instance with the provided method.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getBean()
Get the bean from the handler method.
|
InvocationResult |
getInvocationResultFor(java.lang.Object result,
java.lang.Object inboundPayload)
Build an
InvocationResult for the result and inbound payload. |
java.lang.String |
getMethodAsString(java.lang.Object payload)
Get the method signature for the payload type via
Method.toGenericString(). |
java.lang.reflect.Method |
getMethodFor(java.lang.Object payload)
Get the method for the payload type.
|
java.lang.reflect.Type |
getReturnTypeFor(java.lang.Object payload)
Return the return type for the method that will be chosen for this payload.
|
InvocationResult |
invoke(org.springframework.messaging.Message<?> message,
java.lang.Object... providedArgs)
Invoke the appropriate method for the payload.
|
public HandlerAdapter(org.springframework.messaging.handler.invocation.InvocableHandlerMethod invokerHandlerMethod)
invokerHandlerMethod - the method.public HandlerAdapter(DelegatingInvocableHandler delegatingHandler)
delegatingHandler - the handler.public InvocationResult invoke(@Nullable org.springframework.messaging.Message<?> message, java.lang.Object... providedArgs) throws java.lang.Exception
message - the message.providedArgs - additional arguments.java.lang.Exception - if one occurs.public java.lang.String getMethodAsString(java.lang.Object payload)
Method.toGenericString().payload - the payload.public java.lang.reflect.Method getMethodFor(java.lang.Object payload)
payload - the payload.public java.lang.reflect.Type getReturnTypeFor(java.lang.Object payload)
payload - the payload.public java.lang.Object getBean()
@Nullable public InvocationResult getInvocationResultFor(java.lang.Object result, java.lang.Object inboundPayload)
InvocationResult for the result and inbound payload.result - the result.inboundPayload - the payload.