Class IntegrationResourceHolder
java.lang.Object
org.springframework.integration.transaction.IntegrationResourceHolder
- All Implemented Interfaces:
org.springframework.transaction.support.ResourceHolder
public class IntegrationResourceHolder
extends java.lang.Object
implements org.springframework.transaction.support.ResourceHolder
An implementation of the
ResourceHolder which holds an instance of the current Message
and the synchronization resource- Since:
- 2.2
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINPUT_CHANNELstatic java.lang.StringMESSAGE_SOURCE -
Constructor Summary
Constructors Constructor Description IntegrationResourceHolder() -
Method Summary
Modifier and Type Method Description voidaddAttribute(java.lang.String key, java.lang.Object value)Adds attribute to thisResourceHolderinstancejava.util.Map<java.lang.String,java.lang.Object>getAttributes()Will return an immutable Map of current attributes.org.springframework.messaging.Message<?>getMessage()booleanisVoid()voidreset()voidsetMessage(org.springframework.messaging.Message<?> message)voidunbound()
-
Field Details
-
MESSAGE_SOURCE
public static final java.lang.String MESSAGE_SOURCE- See Also:
- Constant Field Values
-
INPUT_CHANNEL
public static final java.lang.String INPUT_CHANNEL- See Also:
- Constant Field Values
-
-
Constructor Details
-
IntegrationResourceHolder
public IntegrationResourceHolder()
-
-
Method Details
-
setMessage
public void setMessage(org.springframework.messaging.Message<?> message) -
getMessage
public org.springframework.messaging.Message<?> getMessage() -
addAttribute
public void addAttribute(java.lang.String key, java.lang.Object value)Adds attribute to thisResourceHolderinstance- Parameters:
key- The key.value- The value.
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()Will return an immutable Map of current attributes. If you need to add an attribute, use theaddAttribute(String, Object)method.- Returns:
- the immutable map.
-
reset
public void reset()- Specified by:
resetin interfaceorg.springframework.transaction.support.ResourceHolder
-
unbound
public void unbound()- Specified by:
unboundin interfaceorg.springframework.transaction.support.ResourceHolder
-
isVoid
public boolean isVoid()- Specified by:
isVoidin interfaceorg.springframework.transaction.support.ResourceHolder
-