Package org.yamcs.http.websocket
Class ProtobufDecoder
- java.lang.Object
-
- org.yamcs.http.websocket.ProtobufDecoder
-
- All Implemented Interfaces:
WebSocketDecoder
public class ProtobufDecoder extends Object implements WebSocketDecoder
Decodes an incoming web socket message using protobuf.
-
-
Constructor Summary
Constructors Constructor Description ProtobufDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketDecodeContext
decodeMessage(io.netty.buffer.ByteBuf binary)
Decodes the common wrapper fields of an incoming web socket message.<T extends com.google.protobuf.Message.Builder>
TdecodeMessageData(WebSocketDecodeContext ctx, T builder)
Decodes any data that may be wrapped by the incoming web socket message
-
-
-
Method Detail
-
decodeMessage
public WebSocketDecodeContext decodeMessage(io.netty.buffer.ByteBuf binary) throws WebSocketException
Description copied from interface:WebSocketDecoder
Decodes the common wrapper fields of an incoming web socket message. The actual data can be set implementation-specific and does not necessarily need to be processed here, since a second call will be made with an appropriately determined schema.- Specified by:
decodeMessage
in interfaceWebSocketDecoder
- Throws:
WebSocketException
-
decodeMessageData
public <T extends com.google.protobuf.Message.Builder> T decodeMessageData(WebSocketDecodeContext ctx, T builder) throws WebSocketException
Description copied from interface:WebSocketDecoder
Decodes any data that may be wrapped by the incoming web socket message- Specified by:
decodeMessageData
in interfaceWebSocketDecoder
- Throws:
WebSocketException
-
-