Package org.cometd.common
Class JettyJSONContext<M extends Message.Mutable>
- java.lang.Object
-
- org.cometd.common.JettyJSONContext<M>
-
- Direct Known Subclasses:
JettyJSONContextClient
,JettyJSONContextServer
public abstract class JettyJSONContext<M extends Message.Mutable> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
JettyJSONContext.AsyncJSONFactory
protected static class
JettyJSONContext.AsyncJSONParser
protected class
JettyJSONContext.JSONGenerator
-
Constructor Summary
Constructors Modifier Constructor Description protected
JettyJSONContext()
-
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)
org.eclipse.jetty.util.ajax.AsyncJSON.Factory
getAsyncJSONFactory()
JSONContext.Generator
getGenerator()
org.eclipse.jetty.util.ajax.JSON
getJSON()
JSONContext.Parser
getParser()
JSONContext.AsyncParser
newAsyncParser()
protected abstract M
newRoot()
protected abstract M[]
newRootArray(int size)
M[]
parse(java.io.Reader reader)
M[]
parse(java.lang.String json)
void
putConvertor(java.lang.String className, org.eclipse.jetty.util.ajax.JSON.Convertor convertor)
-
-
-
Method Detail
-
getJSON
public org.eclipse.jetty.util.ajax.JSON getJSON()
-
getAsyncJSONFactory
public org.eclipse.jetty.util.ajax.AsyncJSON.Factory getAsyncJSONFactory()
-
newRoot
protected abstract M newRoot()
-
newRootArray
protected abstract M[] newRootArray(int size)
-
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()
-
putConvertor
public void putConvertor(java.lang.String className, org.eclipse.jetty.util.ajax.JSON.Convertor convertor)
-
-