Interface WebSocketDecoder

All Known Implementing Classes:
JsonDecoder

public interface WebSocketDecoder
Used to indicate to the WebSocketServerHandler what type of message can be decoded in a specific media representation.

Current implementations need to at least support decoding the envelope, and are assumed to support all operations. In the future, we could break the API in two (1. envelope, 2. payload) if we ever get to a point of needing that.

  • Method Summary

    Modifier and Type
    Method
    Description
    decodeMessage(io.netty.buffer.ByteBuf binary)
    Decodes the common wrapper fields of an incoming web socket message.
    <T extends com.google.protobuf.Message.Builder>
    T
    Decodes any data that may be wrapped by the incoming web socket message
  • Method Details

    • decodeMessage

      WebSocketDecodeContext decodeMessage(io.netty.buffer.ByteBuf binary) throws WebSocketException
      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.
      Throws:
      WebSocketException
    • decodeMessageData

      <T extends com.google.protobuf.Message.Builder> T decodeMessageData(WebSocketDecodeContext ctx, T builder) throws WebSocketException
      Decodes any data that may be wrapped by the incoming web socket message
      Throws:
      WebSocketException