
com.afrigis.services.impl.GenericResponse Maven / Gradle / Ivy
package com.afrigis.services.impl;
import java.util.ArrayList;
import java.util.List;
import com.afrigis.services.exceptions.AfriGISServicesException;
/**
*
* Default "dumb" response.
*
*
* It will essentially slurp in the server response, and store it as a byte
* array. Retrieve it with {@link #getByteArray()}
*
*
* No further attempt is made to interpret or parse the receive response entity.
*
*
* @author hendrikc
* @see GenericRequest
*
*/
public class GenericResponse extends AbstractResponse {
/**
*
* This object has no specific entity object associated with it, so we have nothing to return.
*
* @return an empty list
*/
@Override
public List listResults() {
return new ArrayList<>();
}
@Override
protected void completeBuild(byte[] input) {
//Empty impl, we only give you bytes and a string
if (isError()) {
throw new AfriGISServicesException(getError());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy