Class MessageChannelStreamListenerResultAdapter
- java.lang.Object
-
- org.springframework.cloud.stream.binding.MessageChannelStreamListenerResultAdapter
-
- All Implemented Interfaces:
StreamListenerResultAdapter<org.springframework.messaging.MessageChannel,org.springframework.messaging.MessageChannel>
public class MessageChannelStreamListenerResultAdapter extends Object implements StreamListenerResultAdapter<org.springframework.messaging.MessageChannel,org.springframework.messaging.MessageChannel>
- Author:
- Marius Bogoevici, Soby Chacko
-
-
Constructor Summary
Constructors Constructor Description MessageChannelStreamListenerResultAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Closeable
adapt(org.springframework.messaging.MessageChannel streamListenerResult, org.springframework.messaging.MessageChannel bindingTarget)
Adapts the result to the binding target.boolean
supports(Class<?> resultType, Class<?> bindingTarget)
Return true if the result type can be converted to the binding target.
-
-
-
Method Detail
-
supports
public boolean supports(Class<?> resultType, Class<?> bindingTarget)
Description copied from interface:StreamListenerResultAdapter
Return true if the result type can be converted to the binding target.- Specified by:
supports
in interfaceStreamListenerResultAdapter<org.springframework.messaging.MessageChannel,org.springframework.messaging.MessageChannel>
- Parameters:
resultType
- the result type.bindingTarget
- the binding target.- Returns:
- true if the conversion can take place.
-
adapt
public Closeable adapt(org.springframework.messaging.MessageChannel streamListenerResult, org.springframework.messaging.MessageChannel bindingTarget)
Description copied from interface:StreamListenerResultAdapter
Adapts the result to the binding target.- Specified by:
adapt
in interfaceStreamListenerResultAdapter<org.springframework.messaging.MessageChannel,org.springframework.messaging.MessageChannel>
- Parameters:
streamListenerResult
- the result of invoking the method.bindingTarget
- the binding target.- Returns:
- an adapted result
-
-