Class JmsMessageReceiver

All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
WebServiceMessageListener

public class JmsMessageReceiver extends SimpleWebServiceMessageReceiverObjectSupport
Convenience base class for JMS server-side transport objects. Contains a WebServiceMessageReceiver, and has methods for handling incoming JMS BytesMessage and TextMessage requests. Also contains a textMessageEncoding property, which determines the encoding used to read from and write to TextMessages. This property defaults to UTF-8.

Used by WebServiceMessageListener.

Since:
1.5.0
Author:
Arjen Poutsma
  • Field Details

    • DEFAULT_TEXT_MESSAGE_ENCODING

      public static final String DEFAULT_TEXT_MESSAGE_ENCODING
      Default encoding used to read from and write to TextMessage messages.
      See Also:
  • Constructor Details

    • JmsMessageReceiver

      public JmsMessageReceiver()
  • Method Details

    • setTextMessageEncoding

      public void setTextMessageEncoding(String textMessageEncoding)
      Sets the encoding used to read from and write to TextMessage messages. Defaults to UTF-8.
    • setPostProcessor

      public void setPostProcessor(org.springframework.jms.core.MessagePostProcessor postProcessor)
      Sets the optional MessagePostProcessor to further modify outgoing messages after the XML contents has been set.
    • handleMessage

      protected final void handleMessage(jakarta.jms.Message request, jakarta.jms.Session session) throws Exception
      Handles an incoming message. Uses the given session to create a response message.
      Parameters:
      request - the incoming message
      session - the JMS session used to create a response
      Throws:
      IllegalArgumentException - when request is not a BytesMessage
      Exception