Spring Integration

org.springframework.integration.transaction
Class IntegrationResourceHolder

java.lang.Object
  extended by 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
Author:
Gary Russell, Oleg Zhurakousky

Field Summary
static java.lang.String INPUT_CHANNEL
           
static java.lang.String MESSAGE_SOURCE
           
 
Constructor Summary
IntegrationResourceHolder()
           
 
Method Summary
 void addAttribute(java.lang.String key, java.lang.Object value)
          Adds attribute to this ResourceHolder instance
 java.util.Map<java.lang.String,java.lang.Object> getAttributes()
          Will return an immutable Map of current attributes.
 Message<?> getMessage()
           
 boolean isVoid()
           
 void reset()
           
 void setMessage(Message<?> message)
           
 void unbound()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 Detail

IntegrationResourceHolder

public IntegrationResourceHolder()
Method Detail

setMessage

public void setMessage(Message<?> message)

getMessage

public Message<?> getMessage()

addAttribute

public void addAttribute(java.lang.String key,
                         java.lang.Object value)
Adds attribute to this ResourceHolder instance

Parameters:
key -
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 the addAttribute(String, Object) method.

Returns:
the immutable map.

reset

public void reset()
Specified by:
reset in interface org.springframework.transaction.support.ResourceHolder

unbound

public void unbound()
Specified by:
unbound in interface org.springframework.transaction.support.ResourceHolder

isVoid

public boolean isVoid()
Specified by:
isVoid in interface org.springframework.transaction.support.ResourceHolder

Spring Integration