com.google.protobuf.gwt.shared
Class JsonStreamFactory
java.lang.Object
com.google.protobuf.gwt.shared.JsonStreamFactory
- Direct Known Subclasses:
- ClientJsonStreamFactory, ServerJsonStreamFactory
public abstract class JsonStreamFactory
- extends Object
Factory interface that makes it easy to switch between different json strema
implementations both on the client and on the server side.
- Author:
- vkulikov@alum.mit.edu Vitaliy Kulikov
DEFAULT_IMPLEMENTATION_TYPE
protected static final JsonStreamFactory.ImplementationType DEFAULT_IMPLEMENTATION_TYPE
JSON_ENCODING_PARAMETER_KEY
public static final String JSON_ENCODING_PARAMETER_KEY
- See Also:
- Constant Field Values
VERBOSE_JSON_STREAM_IMPLEMENTATION_PARAMETER_VALUE
public static final String VERBOSE_JSON_STREAM_IMPLEMENTATION_PARAMETER_VALUE
- See Also:
- Constant Field Values
COMPACT_JSON_STREAM_IMPLEMENTATION_PARAMETER_VALUE
public static final String COMPACT_JSON_STREAM_IMPLEMENTATION_PARAMETER_VALUE
- See Also:
- Constant Field Values
implementationType
protected final JsonStreamFactory.ImplementationType implementationType
JsonStreamFactory
protected JsonStreamFactory(JsonStreamFactory.ImplementationType implementationType)
createNewStreamFromJson
public abstract JsonStream createNewStreamFromJson(String jsonText)
createNewStream
public abstract JsonStream createNewStream(JsonStreamFactory.ImplementationType implementationType)
getImplementationType
public JsonStreamFactory.ImplementationType getImplementationType()
createNewStream
public JsonStream createNewStream()
createNewStreamFromMessage
public JsonStream createNewStreamFromMessage(Message message)
createNewStreamFromMessage
public JsonStream createNewStreamFromMessage(Message message,
JsonStreamFactory.ImplementationType implementationType)
serializeMessage
public String serializeMessage(Message message)
serializeMessage
public String serializeMessage(Message message,
JsonStreamFactory.ImplementationType implementationType)
serializeMessage
public String serializeMessage(Message message,
JsonStreamFactory.ImplementationType implementationType,
boolean prettyPrint)
equals
public boolean equals(Object object)
- Overrides:
equals
in class Object
Copyright © 2014 InMobi. All rights reserved.