Package ninja.bodyparser
Interface BodyParserEngine
-
- All Known Implementing Classes:
BodyParserEngineJson
,BodyParserEngineMultipartPost
,BodyParserEnginePost
,BodyParserEngineXml
public interface BodyParserEngine
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getContentType()
The content type this BodyParserEngine can handle MUST BE THREAD SAFE TO CALL!<T> T
invoke(Context context, Class<T> classOfT)
Invoke the parser and get back a Java object populated with the content of this request.
-
-
-
Method Detail
-
invoke
<T> T invoke(Context context, Class<T> classOfT)
Invoke the parser and get back a Java object populated with the content of this request. MUST BE THREAD SAFE TO CALL!- Parameters:
context
- The contextclassOfT
- The class we expect- Returns:
- The object instance populated with all values from raw request
-
getContentType
String getContentType()
The content type this BodyParserEngine can handle MUST BE THREAD SAFE TO CALL!- Returns:
- the content type. this parser can handle - eg. "application/json"
-
-