Top Description Methods
org.springframework.messaging.core

public Interface MessageSendingOperations<D>

Known Direct Subinterfaces
org.springframework.messaging.simp.SimpMessageSendingOperations, org.springframework.messaging.core.DestinationResolvingMessageSendingOperations
Known Direct Implementers
org.springframework.messaging.core.AbstractMessageSendingTemplate
Type Parameters
<D>
the destination type
Imports
java.util.Map, org.springframework.lang.Nullable, org.springframework.messaging.Message, .MessagingException

Operations for sending messages to a destination.
Authors
Mark Fisher, Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
convertAndSend(Object
the Object to use as payload
payload
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message and send it to a default destination.

public void
convertAndSend(D
the target destination
destination
,
Object
the Object to use as payload
payload
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message and send it to the given destination.

public void
convertAndSend(D
the target destination
destination
,
Object
the Object to use as payload
payload
,
Map<String, Object>
the headers for the message to send
headers
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message with the given headers and send it to the given destination.

public void
convertAndSend(Object
the Object to use as payload
payload
,
MessagePostProcessor
the post processor to apply to the message
postProcessor
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to a default destination.

public void
convertAndSend(D
the target destination
destination
,
Object
the Object to use as payload
payload
,
MessagePostProcessor
the post processor to apply to the message
postProcessor
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to the given destination.

public void
convertAndSend(D
the target destination
destination
,
Object
the Object to use as payload
payload
,
Map<String, Object>
the headers for the message to send
headers
,
MessagePostProcessor
the post processor to apply to the message
postProcessor
)

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message with the given headers, apply the given post processor, and send the resulting message to the given destination.

public void
send(Message<?>
the message to send
message
)

Send a message to a default destination.

public void
send(D
the target destination
destination
,
Message<?>
the message to send
message
)

Send a message to the given destination.

Method Detail

convertAndSendback to summary
public void convertAndSend(Object payload) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message and send it to a default destination.

Parameters
payload:Object

the Object to use as payload

convertAndSendback to summary
public void convertAndSend(D destination, Object payload) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message and send it to the given destination.

Parameters
destination:D

the target destination

payload:Object

the Object to use as payload

convertAndSendback to summary
public void convertAndSend(D destination, Object payload, Map<String, Object> headers) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message with the given headers and send it to the given destination.

Parameters
destination:D

the target destination

payload:Object

the Object to use as payload

headers:Map<String, Object>

the headers for the message to send

convertAndSendback to summary
public void convertAndSend(Object payload, MessagePostProcessor postProcessor) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to a default destination.

Parameters
payload:Object

the Object to use as payload

postProcessor:MessagePostProcessor

the post processor to apply to the message

convertAndSendback to summary
public void convertAndSend(D destination, Object payload, MessagePostProcessor postProcessor) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.MessageConverter, wrap it as a message, apply the given post processor, and send the resulting message to the given destination.

Parameters
destination:D

the target destination

payload:Object

the Object to use as payload

postProcessor:MessagePostProcessor

the post processor to apply to the message

convertAndSendback to summary
public void convertAndSend(D destination, Object payload, Map<String, Object> headers, MessagePostProcessor postProcessor) throws MessagingException

Convert the given Object to serialized form, possibly using a org.springframework.messaging.converter.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:D

the target destination

payload:Object

the Object to use as payload

headers:Map<String, Object>

the headers for the message to send

postProcessor:MessagePostProcessor

the post processor to apply to the message

sendback to summary
public void send(Message<?> message) throws MessagingException

Send a message to a default destination.

Parameters
message:Message<?>

the message to send

sendback to summary
public void send(D destination, Message<?> message) throws MessagingException

Send a message to the given destination.

Parameters
destination:D

the target destination

message:Message<?>

the message to send