Class MCRWebsocketJSONDecoder

java.lang.Object
org.mycore.frontend.ws.common.MCRWebsocketJSONDecoder
All Implemented Interfaces:
jakarta.websocket.Decoder, jakarta.websocket.Decoder.Text<com.google.gson.JsonObject>

public class MCRWebsocketJSONDecoder extends Object implements jakarta.websocket.Decoder.Text<com.google.gson.JsonObject>
Decodes a json string to a gson object.
Author:
Matthias Eichner
  • Constructor Details

    • MCRWebsocketJSONDecoder

      public MCRWebsocketJSONDecoder()
  • Method Details

    • decode

      public com.google.gson.JsonObject decode(String request) throws jakarta.websocket.DecodeException
      Specified by:
      decode in interface jakarta.websocket.Decoder.Text<com.google.gson.JsonObject>
      Throws:
      jakarta.websocket.DecodeException
    • init

      public void init(jakarta.websocket.EndpointConfig config)
      Specified by:
      init in interface jakarta.websocket.Decoder
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.websocket.Decoder
    • willDecode

      public boolean willDecode(String s)
      Specified by:
      willDecode in interface jakarta.websocket.Decoder.Text<com.google.gson.JsonObject>