public class DefaultMetaData extends Object implements MetaDataExtension.MetaData
CONTENT_TYPE, CONTEXT, JAVA_TYPE
Constructor and Description |
---|
DefaultMetaData(CamelContext camelContext,
Map<String,Object> attributes,
Object payload) |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns an attribute associated with this meta data by name.
|
<T> T |
getAttribute(String name,
Class<T> type)
Returns an attribute associated with this meta data by name and
specifying the type required.
|
Map<String,Object> |
getAttributes() |
Object |
getPayload()
Returns the payload of the meta data as a POJO.
|
<T> T |
getPayload(Class<T> type)
Returns the payload of the meta data as specified type.
|
public DefaultMetaData(CamelContext camelContext, Map<String,Object> attributes, Object payload)
public Object getAttribute(String name)
MetaDataExtension.MetaData
getAttribute
in interface MetaDataExtension.MetaData
name
- the attribute namepublic Map<String,Object> getAttributes()
getAttributes
in interface MetaDataExtension.MetaData
public <T> T getAttribute(String name, Class<T> type)
MetaDataExtension.MetaData
getAttribute
in interface MetaDataExtension.MetaData
name
- the attribute nametype
- the type of the attributepublic Object getPayload()
MetaDataExtension.MetaData
getPayload
in interface MetaDataExtension.MetaData
public <T> T getPayload(Class<T> type)
MetaDataExtension.MetaData
getPayload
in interface MetaDataExtension.MetaData
type
- the type that the payload should be converted yo.Apache Camel