Class Environment

java.lang.Object
com.codingchili.core.configuration.Environment

public class Environment extends Object
Utility class to get environment information. Use with care.
  • Constructor Details

    • Environment

      public Environment()
  • Method Details

    • hostname

      public static Optional<String> hostname()
      Returns:
      the hostname of the current machine if available.
    • address

      public static String address()
      Returns:
      an IP address of this host. Which address that is returned is not deterministic in case of multiple network interfaces. It should however not return the loopback address.
    • addresses

      public static List<String> addresses()
      Returns:
      a list of all addresses available on all network interfaces.
    • isJava9

      public static boolean isJava9()
      Returns:
      true if running on Java 9.