Package org.cometd.common
Class JacksonJSONContext<T extends Message.Mutable,I extends T>
java.lang.Object
org.cometd.common.JacksonJSONContext<T,I>
- Direct Known Subclasses:
JacksonJSONContextClient
,JacksonJSONContextServer
public abstract class JacksonJSONContext<T extends Message.Mutable,I extends T> extends Object
-
Constructor Summary
Constructors Modifier Constructor Description protected
JacksonJSONContext()
-
Method Summary
Modifier and Type Method Description String
generate(List<T> messages)
String
generate(T message)
JSONContext.Generator
getGenerator()
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
JSONContext.Parser
getParser()
T[]
parse(InputStream stream)
T[]
parse(Reader reader)
T[]
parse(String json)
protected abstract Class<I[]>
rootArrayClass()
-
Constructor Details
-
JacksonJSONContext
protected JacksonJSONContext()
-
-
Method Details
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
rootArrayClass
-
parse
- Throws:
ParseException
-
parse
- Throws:
ParseException
-
parse
- Throws:
ParseException
-
generate
-
generate
-
getParser
-
getGenerator
-