Class JmsTransportUtils
java.lang.Object
org.springframework.ws.transport.jms.support.JmsTransportUtils
Collection of utility methods to work with JMS transports. Includes methods to retrieve JMS properties from an
URI.- Since:
- 1.5.0
- Author:
- Arjen Poutsma
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds the given header to the specified message.static intgetDeliveryMode(URI uri) Returns the delivery mode of the given URI.static StringgetDestinationName(URI uri) Returns the destination name of the given URI.getHeaderNames(jakarta.jms.Message message) Returns an iterator over all header names in the given message.getHeaders(jakarta.jms.Message message, String name) Returns an iterator over all the header values of the given message and header name.static intgetMessageType(URI uri) Returns the message type of the given URI.static intgetPriority(URI uri) Returns the priority of the given URI.static StringgetReplyToName(URI uri) Returns the reply-to name of the given URI.static longgetTimeToLive(URI uri) Returns the lifetime, in milliseconds, of the given URI.static StringheaderToJmsProperty(String headerName) Converts the given transport header to a JMS property name.static StringjmsPropertyToHeader(String propertyName) Converts the given JMS property name to a transport header name.static URItoUri(jakarta.jms.Destination destination) Converts the given JMS destination into ajmsURI.
-
Method Details
-
headerToJmsProperty
Converts the given transport header to a JMS property name. Returns the given header name if no match is found.- Parameters:
headerName- the header name to transform- Returns:
- the JMS property name
-
jmsPropertyToHeader
Converts the given JMS property name to a transport header name. Returns the given property name if no match is found.- Parameters:
propertyName- the JMS property name to transform- Returns:
- the transport header name
-
toUri
public static URI toUri(jakarta.jms.Destination destination) throws URISyntaxException, jakarta.jms.JMSException Converts the given JMS destination into ajmsURI.- Parameters:
destination- the destination- Returns:
- a jms URI
- Throws:
URISyntaxExceptionjakarta.jms.JMSException
-
getDestinationName
Returns the destination name of the given URI. -
addHeader
public static void addHeader(jakarta.jms.Message message, String name, String value) throws jakarta.jms.JMSException Adds the given header to the specified message.- Throws:
jakarta.jms.JMSException
-
getHeaderNames
public static Iterator<String> getHeaderNames(jakarta.jms.Message message) throws jakarta.jms.JMSException Returns an iterator over all header names in the given message. Delegates tojmsPropertyToHeader(String).- Throws:
jakarta.jms.JMSException
-
getHeaders
public static Iterator<String> getHeaders(jakarta.jms.Message message, String name) throws jakarta.jms.JMSException Returns an iterator over all the header values of the given message and header name. Delegates toheaderToJmsProperty(String).- Throws:
jakarta.jms.JMSException
-
getDeliveryMode
Returns the delivery mode of the given URI.- See Also:
-
DeliveryMode.NON_PERSISTENTDeliveryMode.PERSISTENTMessage.DEFAULT_DELIVERY_MODE
-
getMessageType
Returns the message type of the given URI. Defaults toJmsTransportConstants.BYTES_MESSAGE_TYPE. -
getTimeToLive
Returns the lifetime, in milliseconds, of the given URI.- See Also:
-
Message.DEFAULT_TIME_TO_LIVE
-
getPriority
Returns the priority of the given URI.- See Also:
-
Message.DEFAULT_PRIORITY
-
getReplyToName
Returns the reply-to name of the given URI.- See Also:
-
Message.setJMSReplyTo(Destination)
-