类 AbstractMessageReceivingTemplate<D>

    • 方法详细资料

      • doReceive

        @Nullable
        protected abstract Message<?> doReceive​(D destination)
        Actually receive a message from the given destination.
        参数:
        destination - the target destination
        返回:
        the received message, possibly null if the message could not be received, for example due to a timeout
      • receiveAndConvert

        @Nullable
        public <T> T receiveAndConvert​(D destination,
                                       Class<T> targetClass)
        从接口复制的说明: MessageReceivingOperations
        Receive a message from the given destination and convert its payload to the specified target class.
        指定者:
        receiveAndConvert 在接口中 MessageReceivingOperations<D>
        参数:
        destination - the target destination
        targetClass - the target class to convert the payload to
        返回:
        the converted payload of the reply message, possibly null if the message could not be received, for example due to a timeout
      • doConvert

        @Nullable
        protected <T> T doConvert​(Message<?> message,
                                  Class<T> targetClass)
        Convert from the given message to the given target class.
        参数:
        message - the message to convert
        targetClass - the target class to convert the payload to
        返回:
        the converted payload of the reply message (never null)