Package org.rasdaman.rasnet.util
Class GrpcUtils
java.lang.Object
org.rasdaman.rasnet.util.GrpcUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RuntimeExceptionconvertStatusToRuntimeException(io.grpc.Status status) static booleanisServerAlive(org.rasdaman.rasnet.service.HealthServiceGrpc.HealthServiceBlockingStub healthService, int timeoutMilliseconds) Utility function used to check if the server is alive.
-
Constructor Details
-
GrpcUtils
public GrpcUtils()
-
-
Method Details
-
convertStatusToRuntimeException
-
isServerAlive
public static boolean isServerAlive(org.rasdaman.rasnet.service.HealthServiceGrpc.HealthServiceBlockingStub healthService, int timeoutMilliseconds) Utility function used to check if the server is alive.- Parameters:
healthService- Initialized HealthServiceGrpc.HealthServiceBlockingStub connected to the server.timeoutMilliseconds- The number of milliseconds for which the client will wait for a reply from the server before declaring it unresponsive and returning false.- Returns:
- TRUE if the server responds with a valid message within the given timeout, FALSE otherwise.
-