Package org.cometd.common
Class JettyJSONContext<T extends Message.Mutable>
java.lang.Object
org.cometd.common.JettyJSONContext<T>
- Direct Known Subclasses:
JettyJSONContextClient
,JettyJSONContextServer
public abstract class JettyJSONContext<T extends Message.Mutable> extends Object
-
Constructor Summary
Constructors Modifier Constructor Description protected
JettyJSONContext()
-
Method Summary
Modifier and Type Method Description String
generate(List<T> messages)
String
generate(T message)
JSONContext.Generator
getGenerator()
org.eclipse.jetty.util.ajax.JSON
getJSON()
JSONContext.Parser
getParser()
protected abstract T
newRoot()
protected abstract T[]
newRootArray(int size)
T[]
parse(InputStream stream)
T[]
parse(Reader reader)
T[]
parse(String json)
-
Constructor Details
-
JettyJSONContext
protected JettyJSONContext()
-
-
Method Details
-
getJSON
public org.eclipse.jetty.util.ajax.JSON getJSON() -
newRoot
-
newRootArray
-
parse
- Throws:
ParseException
-
parse
- Throws:
ParseException
-
parse
- Throws:
ParseException
-
generate
-
generate
-
getParser
-
getGenerator
-