Class JmsItemReaderBuilder<T>
java.lang.Object
org.springframework.batch.item.jms.builder.JmsItemReaderBuilder<T>
Creates a fully qualified JmsItemReader.
- Since:
- 4.0
- Author:
- Glenn Renfro, Mahmoud Ben Hassine
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.jms.core.JmsOperations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a fully constructedJmsItemReader.Set the expected type of incoming message payloads.jmsTemplate(org.springframework.jms.core.JmsOperations jmsTemplate) Establish the JMS template that will be used by the JmsItemReader.
-
Field Details
-
itemType
-
jmsTemplate
protected org.springframework.jms.core.JmsOperations jmsTemplate
-
-
Constructor Details
-
JmsItemReaderBuilder
public JmsItemReaderBuilder()
-
-
Method Details
-
jmsTemplate
Establish the JMS template that will be used by the JmsItemReader.- Parameters:
jmsTemplate- aJmsOperationsinstance- Returns:
- this instance for method chaining.
- See Also:
-
itemType
Set the expected type of incoming message payloads. Set this toMessageto 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:
IllegalStateException- if the message payload is of the wrong type.- See Also:
-
build
Returns a fully constructedJmsItemReader.- Returns:
- a new
JmsItemReader
-