
com.sailthru.client.handler.response.JsonResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sailthru-java-client Show documentation
Show all versions of sailthru-java-client Show documentation
Java client library for Sailthru API
package com.sailthru.client.handler.response;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author Prajwal Tuladhar
*/
public class JsonResponse implements Response {
protected Map response = null;
private static final Logger logger = LoggerFactory.getLogger(JsonResponse.class);
public JsonResponse(Object response) {
try {
this.response = (Map) response;
} catch (ClassCastException e) {
logger.error(e.getMessage());
}
}
public boolean isOK() {
return (this.response != null) && !this.response.containsKey("error");
}
public Map getResponse() {
return this.response;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy