Class 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>
    A StreamListenerResultAdapter used for bridging an Output MessageChannel to a bound MessageChannel.
    Author:
    Marius Bogoevici, Soby Chacko
    • Constructor Detail

      • MessageChannelStreamListenerResultAdapter

        public MessageChannelStreamListenerResultAdapter()
    • 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 interface StreamListenerResultAdapter<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 interface StreamListenerResultAdapter<org.springframework.messaging.MessageChannel,​org.springframework.messaging.MessageChannel>
        Parameters:
        streamListenerResult - the result of invoking the method.
        bindingTarget - the binding target.
        Returns:
        an adapted result