Class MetadataReader.Default

java.lang.Object
com.google.jenkins.plugins.util.MetadataReader.Default
All Implemented Interfaces:
MetadataReader
Enclosing interface:
MetadataReader

public static class MetadataReader.Default extends Object implements MetadataReader
A simple default implementation that reads metadata via http requests.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.jenkins.plugins.util.MetadataReader

    MetadataReader.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The address of the GCE Metadata service that provides GCE instances with information about the default service account.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Default(com.google.api.client.http.HttpRequestFactory requestFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Are we on a Google Compute Engine instance?
    readMetadata(String metadataPath)
    Reads the specified sub-element out of the Google Compute Engine instance's metadata.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • METADATA_SERVER

      public static final String METADATA_SERVER
      The address of the GCE Metadata service that provides GCE instances with information about the default service account.
      See Also:
  • Constructor Details

    • Default

      public Default()
    • Default

      public Default(com.google.api.client.http.HttpRequestFactory requestFactory)
  • Method Details