Package org.apache.camel.spi
Interface DataTypeAware
-
public interface DataTypeAwareAllowsMessageto store aDataTypewhich represents the data type of the Message. Sometimes message content is marshaled intoString,InputStreamor etc, and the data type structure is not available until it's unmarshaled into Java object. TheDataTypestored in a DataTypeAware message carries that missing data type information even if it's marshaled, and whatever the Java class of the body is. This type information is used to detect requiredTransformerandValidator. Data type are automatic turned on if one or more routes has been explicit configured with input and output types. Otherwise, data type is default off.- See Also:
DataType,Transformer,Validator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataTypegetDataType()Get the data type of the message.booleanhasDataType()Whether any data type has been configuredvoidsetBody(Object body, DataType type)Set the message body with data type.voidsetDataType(DataType type)Set the data type of the message.
-