org.springframework.batch.item.jms
Class JmsMethodInvocationRecoverer<T>

java.lang.Object
  extended by org.springframework.batch.item.jms.JmsMethodInvocationRecoverer<T>
All Implemented Interfaces:
MethodInvocationRecoverer<T>

public class JmsMethodInvocationRecoverer<T>
extends Object
implements MethodInvocationRecoverer<T>

Author:
Dave Syer

Field Summary
protected  Log logger
           
 
Constructor Summary
JmsMethodInvocationRecoverer()
           
 
Method Summary
 T recover(Object[] items, Throwable cause)
          Send one message per item in the arguments list using the default destination of the jms template.
 void setJmsTemplate(JmsOperations jmsTemplate)
          Setter for jms template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Log logger
Constructor Detail

JmsMethodInvocationRecoverer

public JmsMethodInvocationRecoverer()
Method Detail

setJmsTemplate

public void setJmsTemplate(JmsOperations jmsTemplate)
Setter for jms template.

Parameters:
jmsTemplate - a JmsOperations instance

recover

public T recover(Object[] items,
                 Throwable cause)
Send one message per item in the arguments list using the default destination of the jms template. If the recovery is successful null is returned.

Specified by:
recover in interface MethodInvocationRecoverer<T>
Parameters:
items - the arguments for the method invocation that failed.
cause - the cause of the failure that led to this recovery.
Returns:
the value to be returned to the caller
See Also:
MethodInvocationRecoverer.recover(Object[], Throwable)


Copyright © 2009 SpringSource. All Rights Reserved.