org.springframework.messaging.core

Interface MessageSendingOperations<D>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void convertAndSend(D destination, java.lang.Object payload)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message and send it to the given destination.
      void convertAndSend(D destination, java.lang.Object payload, java.util.Map<java.lang.String,java.lang.Object> headers)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message with the given headers and send it to the given destination.
      void convertAndSend(D destination, java.lang.Object payload, java.util.Map<java.lang.String,java.lang.Object> headers, MessagePostProcessor postProcessor)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message with the given headers, apply the given post processor, and send the resulting message to the given destination.
      void convertAndSend(D destination, java.lang.Object payload, MessagePostProcessor postProcessor)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to the given destination.
      void convertAndSend(java.lang.Object payload)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message and send it to a default destination.
      void convertAndSend(java.lang.Object payload, MessagePostProcessor postProcessor)
      Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to a default destination.
      void send(D destination, Message<?> message)
      Send a message to the given destination.
      void send(Message<?> message)
      Send a message to a default destination.
    • Method Detail

      • send

        void send(D destination,
                  Message<?> message)
           throws MessagingException
        Send a message to the given destination.
        Parameters:
        destination - the target destination
        message - the message to send
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(java.lang.Object payload)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message and send it to a default destination.
        Parameters:
        payload - the Object to use as payload
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(D destination,
                            java.lang.Object payload)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message and send it to the given destination.
        Parameters:
        destination - the target destination
        payload - the Object to use as payload
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(D destination,
                            java.lang.Object payload,
                            java.util.Map<java.lang.String,java.lang.Object> headers)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message with the given headers and send it to the given destination.
        Parameters:
        destination - the target destination
        payload - the Object to use as payload
        headers - headers for the message to send
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(java.lang.Object payload,
                            @Nullable
                            MessagePostProcessor postProcessor)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to a default destination.
        Parameters:
        payload - the Object to use as payload
        postProcessor - the post processor to apply to the message
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(D destination,
                            java.lang.Object payload,
                            MessagePostProcessor postProcessor)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to the given destination.
        Parameters:
        destination - the target destination
        payload - the Object to use as payload
        postProcessor - the post processor to apply to the message
        Throws:
        MessagingException
      • convertAndSend

        void convertAndSend(D destination,
                            java.lang.Object payload,
                            @Nullable
                            java.util.Map<java.lang.String,java.lang.Object> headers,
                            @Nullable
                            MessagePostProcessor postProcessor)
                     throws MessagingException
        Convert the given Object to serialized form, possibly using a MessageConverter, wrap it as a message with the given headers, apply the given post processor, and send the resulting message to the given destination.
        Parameters:
        destination - the target destination
        payload - the Object to use as payload
        headers - headers for the message to send
        postProcessor - the post processor to apply to the message
        Throws:
        MessagingException