Module io.jooby
Package io.jooby

Class EnvironmentOptions

java.lang.Object
io.jooby.EnvironmentOptions

public class EnvironmentOptions extends Object
Available environment options.
Since:
2.0.0
Author:
edgar
  • Constructor Details

    • EnvironmentOptions

      public EnvironmentOptions()
      Creates environment options. Default application file name is: application.conf.
  • Method Details

    • getActiveNames

      public List<String> getActiveNames()
      Active environment names or fallback and read them from system property: application.env .
      Returns:
      Active environment names.
    • setActiveNames

      @NonNull public EnvironmentOptions setActiveNames(@NonNull String... activeNames)
      Set active environment names.
      Parameters:
      activeNames - Active environment names.
      Returns:
      This options.
    • setActiveNames

      @NonNull public EnvironmentOptions setActiveNames(@NonNull List<String> activeNames)
      Set active environment names.
      Parameters:
      activeNames - Active environment names.
      Returns:
      This options.
    • getClassLoader

      @NonNull public ClassLoader getClassLoader()
      Class loader.
      Returns:
      Class loader.
    • getClassLoader

      @NonNull public ClassLoader getClassLoader(@NonNull ClassLoader defaultClassLoader)
      Class loader.
      Parameters:
      defaultClassLoader - Default classloader is none was set.
      Returns:
      Class loader.
    • setClassLoader

      @NonNull public EnvironmentOptions setClassLoader(@NonNull ClassLoader classLoader)
      Set class loader.
      Parameters:
      classLoader - Class loader.
      Returns:
      This options.
    • getBasedir

      @Nullable public String getBasedir()
      Base directory to use or null for default.
      Returns:
      Base directory to use or null for default.s
    • getFilename

      @NonNull public String getFilename()
      Configuration file name.
      Returns:
      Configuration file name.
    • setBasedir

      @NonNull public EnvironmentOptions setBasedir(@Nullable String basedir)
      Set base dir.
      Parameters:
      basedir - Base dir. Classpath folder or file system directory.
      Returns:
      This options.
    • setBasedir

      @NonNull public EnvironmentOptions setBasedir(@Nullable Path basedir)
      Set base dir.
      Parameters:
      basedir - Base dir.
      Returns:
      This options.
    • setFilename

      @NonNull public EnvironmentOptions setFilename(@NonNull String filename)
      Set file name.
      Parameters:
      filename - File name with extension. Supported extensions are: .properties, .conf and .json.
      Returns:
      This environment.