org.springframework.batch.item.jms
Class JmsMethodArgumentsKeyGenerator
java.lang.Object
org.springframework.batch.item.jms.JmsMethodArgumentsKeyGenerator
- All Implemented Interfaces:
- MethodArgumentsKeyGenerator
public class JmsMethodArgumentsKeyGenerator
- extends Object
- implements MethodArgumentsKeyGenerator
A MethodArgumentsKeyGenerator
for JMS
- Author:
- Dave Syer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JmsMethodArgumentsKeyGenerator
public JmsMethodArgumentsKeyGenerator()
getKey
public Object getKey(Object[] items)
- If the message is a
Message
then returns the JMS message ID.
Otherwise just return the first argument.
- Specified by:
getKey
in interface MethodArgumentsKeyGenerator
- Parameters:
items
- the current item.
- Returns:
- a unique identifier.
- Throws:
UnexpectedInputException
- if the JMS id cannot be determined from
a JMS Message
IllegalArgumentException
- if the arguments are empty- See Also:
MethodArgumentsKeyGenerator.getKey(Object[])
Copyright © 2013 SpringSource. All Rights Reserved.