/**
* Response from publish / download from PayloadStore back to the serialization layer
* It contains the final path, response code and the encountered exception if there was any.
*/
public class PayloadResponse {
public final int responseCode;
public final String path;
public final PayloadStoreException PayloadStoreExceptionpayloadStoreException;
public final Boolean retriable;
/**
* Construct payload response with response code and payload id.
*/
public PayloadResponse(int responseCode, String path) {
this(responseCode, path, null);
}
/**
* Construct payload response with response code, payload id and exception.
*/
public PayloadResponse(int responseCode, String path, PayloadStoreException payloadStoreException, Boolean retriable) {
this.responseCode = responseCode;
this.fullPayloadPath = path;
this.PayloadStoreExceptionpayloadStoreException = payloadStoreException;
this.retriable = retriable;
}
} |