类 JmsItemWriter<T>
- java.lang.Object
- org.springframework.batch.item.jms.JmsItemWriter<T>
- 所有已实现的接口:
ItemWriter<T>
public class JmsItemWriter<T> extends java.lang.Object implements ItemWriter<T>
AnItemWriter
for JMS using aJmsTemplate
. The template should have a default destination, which will be used to send items inwrite(List)
.
The implementation is thread-safe after its properties are set (normal singleton behavior).- 作者:
- Dave Syer
字段概要
字段 修饰符和类型 字段 说明 protected org.apache.commons.logging.Log
logger
构造器概要
构造器 构造器 说明 JmsItemWriter()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
setJmsTemplate(org.springframework.jms.core.JmsOperations jmsTemplate)
Setter for JMS template.void
write(java.util.List<? extends T> items)
Send the items one-by-one to the default destination of the JMS template.
字段详细资料
logger
protected org.apache.commons.logging.Log logger
构造器详细资料
JmsItemWriter
public JmsItemWriter()
方法详细资料
setJmsTemplate
public void setJmsTemplate(org.springframework.jms.core.JmsOperations jmsTemplate)
Setter for JMS template.- 参数:
jmsTemplate
- aJmsOperations
instance
write
public void write(java.util.List<? extends T> items) throws java.lang.Exception
Send the items one-by-one to the default destination of the JMS template.- 指定者:
write
在接口中ItemWriter<T>
- 参数:
items
- items to be written- 抛出:
java.lang.Exception
- if there are errors. The framework will catch the exception and convert or rethrow it as appropriate.- 另请参阅:
ItemWriter.write(java.util.List)