Class ResourceUtils


  • public final class ResourceUtils
    extends java.lang.Object
    Utilities for auto detecting resource based on the environment where the application is running.
    Since:
    0.20
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ResourceUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Resource detectResource()
      Returns a Resource.
      • Methods inherited from class java.lang.Object

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

      • EMPTY_RESOURCE

        static final Resource EMPTY_RESOURCE
    • Constructor Detail

      • ResourceUtils

        private ResourceUtils()
    • Method Detail

      • detectResource

        public static Resource detectResource()
        Returns a Resource. Detector sequentially runs resource detection from environment variables, K8S, GCE and AWS.
        Returns:
        a Resource.
        Since:
        0.20