Class JettyJSONContextServer
- All Implemented Interfaces:
JSONContext<ServerMessage.Mutable>, JSONContextServer
public class JettyJSONContextServer
extends JettyJSONContext<ServerMessage.Mutable>
implements JSONContextServer
-
Nested Class Summary
Nested classes/interfaces inherited from class JettyJSONContext
JettyJSONContext.AsyncJSONFactory, JettyJSONContext.AsyncJSONParser, JettyJSONContext.JSONGeneratorNested classes/interfaces inherited from interface JSONContext
JSONContext.AsyncParser, JSONContext.Client, JSONContext.Generator, JSONContext.Parser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate(ServerMessage.Mutable message) Converts a single message to a JSON string.protected ServerMessage.MutableMethods inherited from class JettyJSONContext
getAsyncJSONFactory, getJSON, getParser, parse, putConvertorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JSONContext
getParser, parse
-
Constructor Details
-
JettyJSONContextServer
public JettyJSONContextServer()
-
-
Method Details
-
newMessage
- Specified by:
newMessagein classJettyJSONContext<ServerMessage.Mutable>
-
newAsyncParser
- Specified by:
newAsyncParserin interfaceJSONContext<ServerMessage.Mutable>- Overrides:
newAsyncParserin classJettyJSONContext<ServerMessage.Mutable>- Returns:
- a new
JSONContext.AsyncParserinstance, or null if non-blocking parsing is not supported
-
generate
Description copied from interface:JSONContextConverts a single message to a JSON string.
- Specified by:
generatein interfaceJSONContext<ServerMessage.Mutable>- Specified by:
generatein interfaceJSONContextServer- Overrides:
generatein classJettyJSONContext<ServerMessage.Mutable>- Parameters:
message- the message to stringify- Returns:
- the JSON string for the message
-
getGenerator
- Specified by:
getGeneratorin interfaceJSONContext<ServerMessage.Mutable>- Overrides:
getGeneratorin classJettyJSONContext<ServerMessage.Mutable>- Returns:
- a JSON generator to stringify any object to a JSON string
-