Interface StreamListenerParameterAdapter<A,B>
- Type Parameters:
A- adapter typeB- binding result type
public interface StreamListenerParameterAdapter<A,B>
Strategy for adapting a method argument type annotated with
Input or
Output from a binding type (e.g.
MessageChannel) supported by an existing binder.
This is a framework extension and is not primarily intended for use by end-users.- Author:
- Marius Bogoevici
-
Method Summary
Modifier and TypeMethodDescriptionAdapts the binding target to the argument type.booleanReturn true if the conversion from the binding target type to the argument type is supported.
-
Method Details
-
supports
boolean supports(Class<?> bindingTargetType, org.springframework.core.MethodParameter methodParameter) Return true if the conversion from the binding target type to the argument type is supported.- Parameters:
bindingTargetType- the binding target typemethodParameter- the method parameter for which the conversion is performed- Returns:
- true if the conversion is supported
-
adapt
Adapts the binding target to the argument type. The result will be passed as argument to a method annotated withStreamListenerwhen used for setting up a pipeline.- Parameters:
bindingTarget- the binding targetparameter- the method parameter for which the conversion is performed- Returns:
- an instance of the parameter type, which will be passed to the method
-