Class SimpleJsonResponseParser

java.lang.Object
io.continual.onap.services.mrCommon.SimpleJsonResponseParser
All Implemented Interfaces:
JsonResponseParser

public class SimpleJsonResponseParser extends Object implements JsonResponseParser
This is a basic implementation that parses a response JSON array of strings into a list of strings.
  • Constructor Details

    • SimpleJsonResponseParser

      public SimpleJsonResponseParser()
  • Method Details

    • parseResponseBody

      public void parseResponseBody(String s, OnapMrFetchResponse resp) throws IOException
      Description copied from interface: JsonResponseParser
      Parse the string representation of a response body into the fetch response instance.

      Note: This method is only called by the ResponseBody version above. If you override that, this method does not need to be implemented beyond meeting the compiler requirement.
      Specified by:
      parseResponseBody in interface JsonResponseParser
      Parameters:
      s - the http body as a string
      resp - the fetch response to populate
      Throws:
      IOException - if reading the body throws an IOException