Package io.grpc.alts
Class InternalCheckGcpEnvironment
- java.lang.Object
-
- io.grpc.alts.InternalCheckGcpEnvironment
-
@Internal public final class InternalCheckGcpEnvironment extends java.lang.Object
Class for checking if the system is running on Google Cloud Platform (GCP). This is intended for usage internal to the gRPC team. If you *really* think you need to use this, contact the gRPC team first.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Boolean
cachedResult
private static java.util.logging.Logger
logger
private static java.lang.String
WINDOWS_COMMAND
-
Constructor Summary
Constructors Modifier Constructor Description private
InternalCheckGcpEnvironment()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
checkBiosDataOnWindows(java.io.BufferedReader reader)
(package private) static boolean
checkProductNameOnLinux(java.io.BufferedReader reader)
static boolean
isOnGcp()
Returnstrue
if currently running on Google Cloud Platform (GCP).private static boolean
isRunningOnGcp()
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
WINDOWS_COMMAND
private static final java.lang.String WINDOWS_COMMAND
- See Also:
- Constant Field Values
-
cachedResult
private static java.lang.Boolean cachedResult
-
-
Method Detail
-
isOnGcp
public static boolean isOnGcp()
Returnstrue
if currently running on Google Cloud Platform (GCP).
-
checkProductNameOnLinux
static boolean checkProductNameOnLinux(java.io.BufferedReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
checkBiosDataOnWindows
static boolean checkBiosDataOnWindows(java.io.BufferedReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
isRunningOnGcp
private static boolean isRunningOnGcp()
-
-