Package org.cometd.common
Class JettyJSONContext<M extends org.cometd.bayeux.Message.Mutable>
- java.lang.Object
-
- org.cometd.common.JettyJSONContext<M>
-
- Direct Known Subclasses:
JettyJSONContextClient
public abstract class JettyJSONContext<M extends org.cometd.bayeux.Message.Mutable> extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJettyJSONContext.AsyncJSONFactoryprotected classJettyJSONContext.JSONGenerator
-
Constructor Summary
Constructors Modifier Constructor Description protectedJettyJSONContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringgenerate(List<M> messages)Stringgenerate(M message)org.eclipse.jetty.util.ajax.AsyncJSON.FactorygetAsyncJSONFactory()JSONContext.GeneratorgetGenerator()org.eclipse.jetty.util.ajax.JSONgetJSON()JSONContext.ParsergetParser()JSONContext.AsyncParsernewAsyncParser()protected abstract MnewRoot()protected abstract M[]newRootArray(int size)M[]parse(InputStream stream)M[]parse(Reader reader)M[]parse(String json)voidputConvertor(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(InputStream stream) throws ParseException
- Throws:
ParseException
-
parse
public M[] parse(Reader reader) throws ParseException
- Throws:
ParseException
-
parse
public M[] parse(String json) throws ParseException
- Throws:
ParseException
-
newAsyncParser
public JSONContext.AsyncParser newAsyncParser()
-
getParser
public JSONContext.Parser getParser()
-
getGenerator
public JSONContext.Generator getGenerator()
-
putConvertor
public void putConvertor(String className, org.eclipse.jetty.util.ajax.JSON.Convertor convertor)
-
-