Class JmsItemReaderBuilder<T>


  • public class JmsItemReaderBuilder<T>
    extends java.lang.Object
    Creates a fully qualified JmsItemReader.
    Since:
    4.0
    Author:
    Glenn Renfro
    • Field Detail

      • itemType

        protected java.lang.Class<? extends T> itemType
      • jmsTemplate

        protected org.springframework.jms.core.JmsOperations jmsTemplate
    • Constructor Detail

      • JmsItemReaderBuilder

        public JmsItemReaderBuilder()
    • Method Detail

      • jmsTemplate

        public JmsItemReaderBuilder<T> jmsTemplate​(org.springframework.jms.core.JmsOperations jmsTemplate)
        Establish the JMS template that will be used by the JmsItemReader.
        Parameters:
        jmsTemplate - a JmsOperations instance
        Returns:
        this instance for method chaining.
        See Also:
        JmsItemReader.setJmsTemplate(JmsOperations)
      • itemType

        public JmsItemReaderBuilder<T> itemType​(java.lang.Class<? extends T> itemType)
        Set the expected type of incoming message payloads. Set this to Message to receive the raw underlying message.
        Parameters:
        itemType - the java class of the items to be delivered. Typically the same as the class parameter
        Returns:
        this instance for method chaining.
        Throws:
        java.lang.IllegalStateException - if the message payload is of the wrong type.
        See Also:
        JmsItemReader.setItemType(Class)