Package org.apache.camel
Interface VariableAware
- All Known Subinterfaces:
BrowsableVariableRepository
,Exchange
,PooledExchange
,VariableRepository
public interface VariableAware
An interface to represent an object that supports variables.
-
Method Summary
Modifier and TypeMethodDescriptiongetVariable
(String name) Returns a variable by name.void
setVariable
(String name, Object value) Sets a variable
-
Method Details
-
getVariable
Returns a variable by name. If the variable is of typeStreamCache
then the repository should ensure to reset the stream cache before returning the value, to ensure the content can be read by the Camel end user and would be re-readable next time.- Parameters:
name
- the name of the variable- Returns:
- the value of the given variable or null if there is no variable for the given name
-
setVariable
Sets a variable- Parameters:
name
- of the variablevalue
- the value of the variable
-