Class JsonRpcMessage

    • Constructor Detail

      • JsonRpcMessage

        public JsonRpcMessage()
    • Method Detail

      • write

        public abstract void write​(Writer out)
                            throws IOException
        Writes this message as a JSON string to the specified writer.
        Parameters:
        out - the writer
        Throws:
        IOException - if a writing error occurs
      • read

        public static JsonRpcMessage read​(Map<?,​?> map)
                                   throws ParseException
        Reads a JSON-RPC 2.0 message from the specified map, which should represent a JSON object.
        Parameters:
        map - the map
        Returns:
        the message
        Throws:
        ParseException - if the map is not a valid JSON-RPC message