All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dg.libs.rest.parsers.HttpResponseParser Maven / Gradle / Ivy

There is a newer version: 2.9.0
Show newest version
package com.dg.libs.rest.parsers;

import java.io.InputStream;

/**
 * The {@link HttpResponseParser} interface has the responsibility to parse
 * responses from the server.
 * 
 * @param 
 *          Parameter that indicates which object the parser returns. It can be
 *          of any type.
 */
public interface HttpResponseParser {

  /**
   * This method is used for parsing JSON response from server. Given a JSON
   * string, returns response data which can be of any type.
   * 
   * @param responseStream
   *          The JSON string needed for parsing.
   * @return Object of any type returned by the parser.
   * @throws Exception
   *           Thrown when various parsing errors occur.
   */
  public T parse(final InputStream instream) throws Exception;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy