public class JettyJSONContextServer extends JettyJSONContext<ServerMessage.Mutable> implements JSONContextServer
JettyJSONContext.AsyncJSONFactory, JettyJSONContext.AsyncJSONParser, JettyJSONContext.JSONGenerator
JSONContext.AsyncParser, JSONContext.Client, JSONContext.Generator, JSONContext.Parser
Constructor and Description |
---|
JettyJSONContextServer() |
Modifier and Type | Method and Description |
---|---|
String |
generate(ServerMessage.Mutable message)
Converts a single message to a JSON string.
|
JSONContext.Generator |
getGenerator() |
JSONContext.AsyncParser |
newAsyncParser() |
protected ServerMessage.Mutable |
newRoot() |
protected ServerMessage.Mutable[] |
newRootArray(int size) |
generate, getAsyncJSONFactory, getJSON, getParser, parse, parse, parse, putConvertor
protected ServerMessage.Mutable newRoot()
newRoot
in class JettyJSONContext<ServerMessage.Mutable>
protected ServerMessage.Mutable[] newRootArray(int size)
newRootArray
in class JettyJSONContext<ServerMessage.Mutable>
public JSONContext.AsyncParser newAsyncParser()
newAsyncParser
in interface JSONContext<ServerMessage.Mutable>
newAsyncParser
in class JettyJSONContext<ServerMessage.Mutable>
JSONContext.AsyncParser
instance, or null if non-blocking parsing is not supportedpublic String generate(ServerMessage.Mutable message)
JSONContext
Converts a single message to a JSON string.
generate
in interface JSONContext<ServerMessage.Mutable>
generate
in interface JSONContextServer
generate
in class JettyJSONContext<ServerMessage.Mutable>
message
- the message to stringifypublic JSONContext.Generator getGenerator()
getGenerator
in interface JSONContext<ServerMessage.Mutable>
getGenerator
in class JettyJSONContext<ServerMessage.Mutable>
Copyright © 2008–2024 The CometD Project. All rights reserved.