Package ninja.bodyparser
Class BodyParserEngineXml
- java.lang.Object
-
- ninja.bodyparser.BodyParserEngineXml
-
- All Implemented Interfaces:
BodyParserEngine
public class BodyParserEngineXml extends Object implements BodyParserEngine
Built in Xml body parser.- Author:
- Raphael Bauer, Thibault Meyer
- See Also:
BodyParserEngine
-
-
Constructor Summary
Constructors Constructor Description BodyParserEngineXml(com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()The content type this BodyParserEngine can handle MUST BE THREAD SAFE TO CALL!<T> Tinvoke(Context context, Class<T> classOfT)Invoke the parser and get back a Java object populated with the content of this request.
-
-
-
Method Detail
-
invoke
public <T> T invoke(Context context, Class<T> classOfT)
Description copied from interface:BodyParserEngineInvoke the parser and get back a Java object populated with the content of this request. MUST BE THREAD SAFE TO CALL!- Specified by:
invokein interfaceBodyParserEngine- Parameters:
context- The contextclassOfT- The class we expect- Returns:
- The object instance populated with all values from raw request
-
getContentType
public String getContentType()
Description copied from interface:BodyParserEngineThe content type this BodyParserEngine can handle MUST BE THREAD SAFE TO CALL!- Specified by:
getContentTypein interfaceBodyParserEngine- Returns:
- the content type. this parser can handle - eg. "application/json"
-
-