public class JsonDecoder extends Object implements WebSocketDecoder
| Constructor and Description |
|---|
JsonDecoder() |
| Modifier and Type | Method and Description |
|---|---|
WebSocketDecodeContext |
decodeMessage(InputStream in)
Decodes the first few common wrapper fields of an incoming web socket message.
Sample: [1,1,2,{"<resource>":"<operation>", "data": <undecoded remainder>}] |
<T extends com.google.protobuf.MessageLite.Builder> |
decodeMessageData(WebSocketDecodeContext ctx,
io.protostuff.Schema<T> schema)
Decodes any data that may be wrapped by the incoming web socket message
|
static void |
main(String... args) |
protected static void |
requireTerminalToken(int requestId,
com.fasterxml.jackson.core.JsonParser jsp,
com.fasterxml.jackson.core.JsonToken token) |
protected static void |
requireToken(int requestId,
com.fasterxml.jackson.core.JsonParser jsp,
com.fasterxml.jackson.core.JsonToken token,
String type) |
public WebSocketDecodeContext decodeMessage(InputStream in) throws WebSocketException
decodeMessage in interface WebSocketDecoderWebSocketExceptionprotected static void requireToken(int requestId,
com.fasterxml.jackson.core.JsonParser jsp,
com.fasterxml.jackson.core.JsonToken token,
String type)
throws IOException,
WebSocketException
IOExceptionWebSocketExceptionprotected static void requireTerminalToken(int requestId,
com.fasterxml.jackson.core.JsonParser jsp,
com.fasterxml.jackson.core.JsonToken token)
throws IOException,
WebSocketException
IOExceptionWebSocketExceptionpublic <T extends com.google.protobuf.MessageLite.Builder> T decodeMessageData(WebSocketDecodeContext ctx, io.protostuff.Schema<T> schema) throws WebSocketException
WebSocketDecoderdecodeMessageData in interface WebSocketDecoderWebSocketExceptionpublic static void main(String... args) throws WebSocketException
WebSocketExceptionCopyright © 2018 Space Applications Services. All rights reserved.