Interface JmsClient.OperationSpec
- Enclosing interface:
- JmsClient
public static interface JmsClient.OperationSpec
Common JMS send and receive operations with various settings.
- Since:
- 7.0
- Author:
- Juergen Hoeller
- 
Method SummaryModifier and TypeMethodDescriptionreceive()Receive aMessagefrom the pre-bound destination.<T> Optional<T> Receive aMessagefrom the pre-bound destination, extracting and converting its payload.Receive aMessagefrom the pre-bound destination.<T> Optional<T> Receive aMessagefrom the pre-bound destination, extracting and converting its payload.voidSend a message with the given payload to the pre-bound destination.voidSend a message with the given payload to the pre-bound destination.voidSend the givenMessageto the pre-bound destination.<T> Optional<T> sendAndReceive(Object request, Class<T> targetClass) Send a request message and receive the reply from the given destination.<T> Optional<T> Send a request message and receive the reply from the given destination.sendAndReceive(Message<?> requestMessage) Send a request message and receive the reply from the given destination.withDeliveryDelay(long deliveryDelay) Apply the given delivery delay to any subsequent send operations.withDeliveryPersistent(boolean persistent) Set whether message delivery should be persistent or non-persistent.withPriority(int priority) Apply the given priority to any subsequent send operations.withReceiveTimeout(long receiveTimeout) Apply the given timeout to any subsequent receive operations.withTimeToLive(long timeToLive) Apply the given time-to-live to any subsequent send operations.
- 
Method Details- 
withReceiveTimeoutApply the given timeout to any subsequent receive operations.- Parameters:
- receiveTimeout- the timeout in milliseconds
- See Also:
 
- 
withDeliveryDelayApply the given delivery delay to any subsequent send operations.- Parameters:
- deliveryDelay- the delay in milliseconds
- See Also:
 
- 
withDeliveryPersistentSet whether message delivery should be persistent or non-persistent.- Parameters:
- persistent- to choose between delivery mode "PERSISTENT" (- true) or "NON_PERSISTENT" (- false)
- See Also:
 
- 
withPriorityApply the given priority to any subsequent send operations.- Parameters:
- priority- the priority value
- See Also:
 
- 
withTimeToLiveApply the given time-to-live to any subsequent send operations.- Parameters:
- timeToLive- the message lifetime in milliseconds
- See Also:
 
- 
sendSend the givenMessageto the pre-bound destination.- Parameters:
- message- the spring-messaging- Messageto send
- Throws:
- MessagingException
- See Also:
 
- 
sendSend a message with the given payload to the pre-bound destination.- Parameters:
- payload- the payload to convert into a- Message
- Throws:
- MessagingException
- See Also:
 
- 
sendSend a message with the given payload to the pre-bound destination.- Parameters:
- payload- the payload to convert into a- Message
- headers- the message headers to apply to the- Message
- Throws:
- MessagingException
- See Also:
 
- 
receiveReceive aMessagefrom the pre-bound destination.- Returns:
- the spring-messaging Messagereceived, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
receiveReceive aMessagefrom the pre-bound destination, extracting and converting its payload.- Parameters:
- targetClass- the class to convert the payload to
- Returns:
- the payload of the Messagereceived, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
receiveReceive aMessagefrom the pre-bound destination.- Parameters:
- messageSelector- the JMS message selector to apply
- Returns:
- the spring-messaging Messagereceived, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
receiveReceive aMessagefrom the pre-bound destination, extracting and converting its payload.- Parameters:
- messageSelector- the JMS message selector to apply
- targetClass- the class to convert the payload to
- Returns:
- the payload of the Messagereceived, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
sendAndReceiveSend a request message and receive the reply from the given destination.- Parameters:
- requestMessage- the spring-messaging- Messageto send
- Returns:
- the spring-messaging Messagereceived as a reply, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
sendAndReceiveSend a request message and receive the reply from the given destination.- Parameters:
- request- the payload to convert into a request- Message
- targetClass- the class to convert the reply's payload to
- Returns:
- the payload of the Messagereceived as a reply, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
- 
sendAndReceive<T> Optional<T> sendAndReceive(Object request, Map<String, Object> headers, Class<T> targetClass) throws MessagingExceptionSend a request message and receive the reply from the given destination.- Parameters:
- request- the payload to convert into a request- Message
- headers- the message headers to apply to the request- Message
- targetClass- the class to convert the reply's payload to
- Returns:
- the payload of the Messagereceived as a reply, orOptional.empty()if none
- Throws:
- MessagingException
- See Also:
 
 
-