Class JacksonJSONContextServer
java.lang.Object
org.cometd.common.JacksonJSONContext<ServerMessage.Mutable, ServerMessageImpl>
org.cometd.server.JacksonJSONContextServer
- All Implemented Interfaces:
JSONContext<ServerMessage.Mutable>, JSONContextServer
public class JacksonJSONContextServer
extends JacksonJSONContext<ServerMessage.Mutable, ServerMessageImpl>
implements JSONContextServer
-
Nested Class Summary
Nested classes/interfaces inherited from class JacksonJSONContext
JacksonJSONContext.ObjectMapperGeneratorNested 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 Class<ServerMessageImpl> Methods inherited from class JacksonJSONContext
getObjectMapper, getParser, newAsyncParser, parseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JSONContext
getParser, newAsyncParser, parse
-
Constructor Details
-
JacksonJSONContextServer
public JacksonJSONContextServer()
-
-
Method Details
-
messageClass
- Specified by:
messageClassin classJacksonJSONContext<ServerMessage.Mutable, ServerMessageImpl>
-
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 classJacksonJSONContext<ServerMessage.Mutable, ServerMessageImpl>- Parameters:
message- the message to stringify- Returns:
- the JSON string for the message
-
getGenerator
- Specified by:
getGeneratorin interfaceJSONContext<ServerMessage.Mutable>- Overrides:
getGeneratorin classJacksonJSONContext<ServerMessage.Mutable, ServerMessageImpl>- Returns:
- a JSON generator to stringify any object to a JSON string
-