Package ninja.bodyparser
Class BodyParserEnginePost
- java.lang.Object
-
- ninja.bodyparser.BodyParserEnginePost
-
- All Implemented Interfaces:
BodyParserEngine
- Direct Known Subclasses:
BodyParserEngineMultipartPost
public class BodyParserEnginePost extends Object implements BodyParserEngine
-
-
Constructor Summary
Constructors Constructor Description BodyParserEnginePost(ParamParsers paramParsers)
-
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.
-
-
-
Constructor Detail
-
BodyParserEnginePost
@Inject public BodyParserEnginePost(ParamParsers paramParsers)
-
-
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"
-
-