public static class MetadataReader.Default extends Object implements MetadataReader
MetadataReader.Default
Modifier and Type | Field and Description |
---|---|
static String |
METADATA_SERVER
The address of the GCE Metadata service that provides GCE instances with information about
the default service account.
|
Constructor and Description |
---|
Default() |
Default(com.google.api.client.http.HttpRequestFactory requestFactory) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMetadata()
Are we on a Google Compute Engine instance?
|
String |
readMetadata(String metadataPath)
Reads the specified sub-element out of the Google Compute Engine instance's metadata.
|
public static final String METADATA_SERVER
public Default()
public Default(com.google.api.client.http.HttpRequestFactory requestFactory)
public String readMetadata(String metadataPath) throws IOException, ExecutorException
readMetadata
in interface MetadataReader
IOException
ExecutorException
public boolean hasMetadata()
hasMetadata
in interface MetadataReader
Copyright © 2016–2021. All rights reserved.