类 AmqpItemReader<T>
- java.lang.Object
- org.springframework.batch.item.amqp.AmqpItemReader<T>
- 所有已实现的接口:
ItemReader<T>
public class AmqpItemReader<T> extends java.lang.Object implements ItemReader<T>
AMQP
ItemReader
implementation using anAmqpTemplate
to receive and/or convert messages.- 作者:
- Chris Schaefer, Mahmoud Ben Hassine
构造器概要
构造器 构造器 说明 AmqpItemReader(org.springframework.amqp.core.AmqpTemplate amqpTemplate)
Initialize the AmqpItemReader.
构造器详细资料
AmqpItemReader
public AmqpItemReader(org.springframework.amqp.core.AmqpTemplate amqpTemplate)
Initialize the AmqpItemReader.- 参数:
amqpTemplate
- the template to be used. Must not be null.
方法详细资料
read
public T read()
从接口复制的说明:ItemReader
Reads a piece of input data and advance to the next one. Implementations must returnnull
at the end of the input data set. In a transactional setting, caller might get the same item twice from successive calls (or otherwise), if the first call was in a transaction that rolled back.- 指定者:
read
在接口中ItemReader<T>
- 返回:
- T the item to be processed or
null
if the data source is exhausted
setItemType
public void setItemType(java.lang.Class<? extends T> itemType)
Establish the itemType for the reader.- 参数:
itemType
- class type that will be returned by the reader.