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

com.turbospaces.rpc.DefaultGrpcApiResponseEntity Maven / Gradle / Ivy

There is a newer version: 2.0.33
Show newest version
package com.turbospaces.rpc;

import java.util.Objects;

import com.google.protobuf.Message;
import com.turbospaces.api.facade.ResponseStatusFacade;

import api.v1.CacheControl;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;

@AllArgsConstructor(access = AccessLevel.PUBLIC)
public class DefaultGrpcApiResponseEntity implements ApiResponseEntity {
    private final ResponseStatusFacade status;
    private final api.v1.CacheControl cacheControl;
    private final T resp;

    @Override
    public ResponseStatusFacade status() {
        return status;
    }
    @Override
    public boolean hasBody() {
        return Objects.nonNull(resp);
    }
    @Override
    public T body() {
        return resp;
    }
    @Override
    public CacheControl cacheControl() {
        return cacheControl;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy