com.turbospaces.rpc.ApiResponseEntity Maven / Gradle / Ivy
package com.turbospaces.rpc;
import java.io.IOException;
import com.google.protobuf.Message;
import com.turbospaces.api.facade.ResponseStatusFacade;
import api.v1.ReplyUtil;
public interface ApiResponseEntity {
ResponseStatusFacade status();
T body() throws IOException;
api.v1.CacheControl cacheControl();
default void verifyOk() throws Exception {
ReplyUtil.verifyOk(status());
}
default T getBodyAndVerifyOk() throws Exception {
verifyOk();
return body();
}
}