Interface JsonResponseParser
-
- All Known Implementing Classes:
SimpleJsonResponseParser
public interface JsonResponseParserA parser that receives the MR subscriber response body and returns a list of strings. This class allows this distribution to remain JSON parser neutral without assuming that it's run in a J2EE environment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidparseResponseBody(String httpBody, OnapMrFetchResponse fetchResponse)Parse the string representation of a response body into the fetch response instance.
Note: This method is only called by the ResponseBody version above.default voidparseResponseBody(okhttp3.ResponseBody httpBody, OnapMrFetchResponse fetchResponse)Parse the okhttp response body into the fetch response instance.
-
-
-
Method Detail
-
parseResponseBody
default void parseResponseBody(okhttp3.ResponseBody httpBody, OnapMrFetchResponse fetchResponse) throws IOExceptionParse the okhttp response body into the fetch response instance.- Parameters:
httpBody- the okhttp response bodyfetchResponse- the fetch response to populate- Throws:
IOException- if reading the body throws an IOException
-
parseResponseBody
void parseResponseBody(String httpBody, OnapMrFetchResponse fetchResponse) throws IOException
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.- Parameters:
httpBody- the http body as a stringfetchResponse- the fetch response to populate- Throws:
IOException- if reading the body throws an IOException
-
-