Package org.cometd.common
Class JacksonJSONContext<M extends Message.Mutable,I extends M>
- java.lang.Object
-
- org.cometd.common.JacksonJSONContext<M,I>
-
- Direct Known Subclasses:
JacksonJSONContextClient
,JacksonJSONContextServer
public abstract class JacksonJSONContext<M extends Message.Mutable,I extends M> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
JacksonJSONContext.ObjectMapperGenerator
-
Constructor Summary
Constructors Modifier Constructor Description protected
JacksonJSONContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
generate(java.util.List<M> messages)
java.lang.String
generate(M message)
JSONContext.Generator
getGenerator()
com.fasterxml.jackson.databind.ObjectMapper
getObjectMapper()
JSONContext.Parser
getParser()
JSONContext.AsyncParser
newAsyncParser()
M[]
parse(java.io.Reader reader)
M[]
parse(java.lang.String json)
protected abstract java.lang.Class<I[]>
rootArrayClass()
-
-
-
Method Detail
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
rootArrayClass
protected abstract java.lang.Class<I[]> rootArrayClass()
-
parse
public M[] parse(java.io.Reader reader) throws java.text.ParseException
- Throws:
java.text.ParseException
-
parse
public M[] parse(java.lang.String json) throws java.text.ParseException
- Throws:
java.text.ParseException
-
newAsyncParser
public JSONContext.AsyncParser newAsyncParser()
-
generate
public java.lang.String generate(M message)
-
generate
public java.lang.String generate(java.util.List<M> messages)
-
getParser
public JSONContext.Parser getParser()
-
getGenerator
public JSONContext.Generator getGenerator()
-
-