Package net.officefloor.web.json
Class JacksonHttpObjectParserFactory
- java.lang.Object
-
- net.officefloor.web.json.JacksonHttpObjectParserFactory
-
- All Implemented Interfaces:
HttpObjectParserFactory
public class JacksonHttpObjectParserFactory extends java.lang.Object implements HttpObjectParserFactory
JacksonHttpObjectParserFactory
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description JacksonHttpObjectParserFactory(com.fasterxml.jackson.databind.ObjectMapper mapper)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> HttpObjectParser<T>
createHttpObjectParser(java.lang.Class<T> objectClass)
Creates theHttpObjectParser
for theObject
.java.lang.String
getContentType()
Obtains theContent-Type
supported by the createHttpObjectParser
instances.
-
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Description copied from interface:HttpObjectParserFactory
Obtains theContent-Type
supported by the createHttpObjectParser
instances.- Specified by:
getContentType
in interfaceHttpObjectParserFactory
- Returns:
Content-Type
.
-
createHttpObjectParser
public <T> HttpObjectParser<T> createHttpObjectParser(java.lang.Class<T> objectClass) throws java.lang.Exception
Description copied from interface:HttpObjectParserFactory
Creates theHttpObjectParser
for theObject
.- Specified by:
createHttpObjectParser
in interfaceHttpObjectParserFactory
- Type Parameters:
T
- Object type.- Parameters:
objectClass
-Object
Class
.- Returns:
HttpObjectParser
for theObject
. May returnnull
if does not support parsing out the particularObject
.- Throws:
java.lang.Exception
- If fails to create theHttpObjectParser
for theObject
.
-
-