Package org.cometd.server
Class JettyJSONContextServer
- java.lang.Object
-
- org.cometd.common.JettyJSONContext<ServerMessage.Mutable>
-
- org.cometd.server.JettyJSONContextServer
-
- All Implemented Interfaces:
JSONContext.Server
public class JettyJSONContextServer extends JettyJSONContext<ServerMessage.Mutable> implements JSONContext.Server
-
-
Constructor Summary
Constructors Constructor Description JettyJSONContextServer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
generate(List<T> messages)
String
generate(T message)
JSONContext.Generator
getGenerator()
JSONContext.Parser
getParser()
protected ServerMessage.Mutable
newRoot()
protected ServerMessage.Mutable[]
newRootArray(int size)
T[]
parse(InputStream stream)
T[]
parse(Reader reader)
T[]
parse(String json)
-
Methods inherited from class org.cometd.common.JettyJSONContext
generate, generate, getGenerator, getJSON, getParser, parse, parse, parse
-
-
-
-
Method Detail
-
newRoot
protected ServerMessage.Mutable newRoot()
- Specified by:
newRoot
in classJettyJSONContext<ServerMessage.Mutable>
-
newRootArray
protected ServerMessage.Mutable[] newRootArray(int size)
- Specified by:
newRootArray
in classJettyJSONContext<ServerMessage.Mutable>
-
parse
public abstract T[] parse(InputStream stream) throws ParseException
- Throws:
ParseException
-
parse
public abstract T[] parse(Reader reader) throws ParseException
- Throws:
ParseException
-
parse
public abstract T[] parse(String json) throws ParseException
- Throws:
ParseException
-
generate
public abstract String generate(T message)
-
getParser
public abstract JSONContext.Parser getParser()
-
getGenerator
public abstract JSONContext.Generator getGenerator()
-
-