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 protectedJettyJSONContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringgenerate(List<T> messages)Stringgenerate(T message)JSONContext.GeneratorgetGenerator()org.eclipse.jetty.util.ajax.JSONgetJSON()JSONContext.ParsergetParser()protected abstract TnewRoot()protected abstract T[]newRootArray(int size)T[]parse(InputStream stream)T[]parse(Reader reader)T[]parse(String json)
-
-
-
Method Detail
-
getJSON
public org.eclipse.jetty.util.ajax.JSON getJSON()
-
newRoot
protected abstract T newRoot()
-
newRootArray
protected abstract T[] newRootArray(int size)
-
parse
public T[] parse(InputStream stream) throws ParseException
- Throws:
ParseException
-
parse
public T[] parse(Reader reader) throws ParseException
- Throws:
ParseException
-
parse
public T[] parse(String json) throws ParseException
- Throws:
ParseException
-
getParser
public JSONContext.Parser getParser()
-
getGenerator
public JSONContext.Generator getGenerator()
-
-