Package org.springframework.amqp.core
Interface AsyncAmqpTemplate
-
public interface AsyncAmqpTemplateClasses implementing this interface can perform asynchronous send and receive operations.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.Object object)Convert the object to a message and send it to the default exchange with the default routing key.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the default exchange with the default routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.String routingKey, java.lang.Object object)Convert the object to a message and send it to the default exchange with the provided routing key.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the default exchange with the provided routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object)Convert the object to a message and send it to the provided exchange and routing key.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceive(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the provided exchange and routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the default routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the default routing key.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the provided routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.String routingKey, java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the provided routing key.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the provided exchange and routing key after invoking theMessagePostProcessor.<C> org.springframework.util.concurrent.ListenableFuture<C>convertSendAndReceiveAsType(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the provided exchange and routing key.org.springframework.util.concurrent.ListenableFuture<Message>sendAndReceive(java.lang.String exchange, java.lang.String routingKey, Message message)Send a message to the supplied exchange and routing key.org.springframework.util.concurrent.ListenableFuture<Message>sendAndReceive(java.lang.String routingKey, Message message)Send a message to the default exchange with the supplied routing key.org.springframework.util.concurrent.ListenableFuture<Message>sendAndReceive(Message message)Send a message to the default exchange with the default routing key.
-
-
-
Method Detail
-
sendAndReceive
org.springframework.util.concurrent.ListenableFuture<Message> sendAndReceive(Message message)
Send a message to the default exchange with the default routing key. If the message contains a correlationId property, it must be unique.- Parameters:
message- the message.- Returns:
- the
ListenableFuture.
-
sendAndReceive
org.springframework.util.concurrent.ListenableFuture<Message> sendAndReceive(java.lang.String routingKey, Message message)
Send a message to the default exchange with the supplied routing key. If the message contains a correlationId property, it must be unique.- Parameters:
routingKey- the routing key.message- the message.- Returns:
- the
ListenableFuture.
-
sendAndReceive
org.springframework.util.concurrent.ListenableFuture<Message> sendAndReceive(java.lang.String exchange, java.lang.String routingKey, Message message)
Send a message to the supplied exchange and routing key. If the message contains a correlationId property, it must be unique.- Parameters:
exchange- the exchange.routingKey- the routing key.message- the message.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.Object object)
Convert the object to a message and send it to the default exchange with the default routing key.- Type Parameters:
C- the expected result type.- Parameters:
object- the object to convert.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.String routingKey, java.lang.Object object)Convert the object to a message and send it to the default exchange with the provided routing key.- Type Parameters:
C- the expected result type.- Parameters:
routingKey- the routing key.object- the object to convert.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object)Convert the object to a message and send it to the provided exchange and routing key.- Type Parameters:
C- the expected result type.- Parameters:
exchange- the exchange.routingKey- the routing key.object- the object to convert.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the default exchange with the default routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
object- the object to convert.messagePostProcessor- the post processor.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the default exchange with the provided routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
routingKey- the routing key.object- the object to convert.messagePostProcessor- the post processor.- Returns:
- the
ListenableFuture.
-
convertSendAndReceive
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceive(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor)Convert the object to a message and send it to the provided exchange and routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
exchange- the exchangeroutingKey- the routing key.object- the object to convert.messagePostProcessor- the post processor.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the default routing key.- Type Parameters:
C- the expected result type.- Parameters:
object- the object to convert.responseType- the response type.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.String routingKey, java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the provided routing key.- Type Parameters:
C- the expected result type.- Parameters:
routingKey- the routing key.object- the object to convert.responseType- the response type.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the provided exchange and routing key.- Type Parameters:
C- the expected result type.- Parameters:
exchange- the exchange.routingKey- the routing key.object- the object to convert.responseType- the response type.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the default routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
object- the object to convert.messagePostProcessor- the post processor.responseType- the response type.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the default exchange with the provided routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
routingKey- the routing key.object- the object to convert.messagePostProcessor- the post processor.responseType- the response type.- Returns:
- the
ListenableFuture.
-
convertSendAndReceiveAsType
<C> org.springframework.util.concurrent.ListenableFuture<C> convertSendAndReceiveAsType(java.lang.String exchange, java.lang.String routingKey, java.lang.Object object, MessagePostProcessor messagePostProcessor, org.springframework.core.ParameterizedTypeReference<C> responseType)Convert the object to a message and send it to the provided exchange and routing key after invoking theMessagePostProcessor. If the post processor adds a correlationId property, it must be unique.- Type Parameters:
C- the expected result type.- Parameters:
exchange- the exchangeroutingKey- the routing key.object- the object to convert.messagePostProcessor- the post processor.responseType- the response type.- Returns:
- the
ListenableFuture.
-
-