Interface ApplicationEnvironmentType

  • All Known Implementing Classes:
    ApplicationRealEnvironment

    public interface ApplicationEnvironmentType
    An abstraction over the application's execution environment.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> environmentVariable​(java.lang.String name)
      Retrieve the value of an environment variable.
      java.nio.file.FileSystem filesystem()  
      <S> java.util.Iterator<S> servicesFor​(java.lang.Class<S> clazz)  
      java.util.Optional<java.lang.String> systemProperty​(java.lang.String name)
      Retrieve the value of a system property.
    • Method Detail

      • filesystem

        java.nio.file.FileSystem filesystem()
        Returns:
        The application's filesystem
      • systemProperty

        java.util.Optional<java.lang.String> systemProperty​(java.lang.String name)
        Retrieve the value of a system property.
        Parameters:
        name - The property name
        Returns:
        The property value
      • environmentVariable

        java.util.Optional<java.lang.String> environmentVariable​(java.lang.String name)
        Retrieve the value of an environment variable.
        Parameters:
        name - The variable name
        Returns:
        The variable value
      • servicesFor

        <S> java.util.Iterator<S> servicesFor​(java.lang.Class<S> clazz)
        Type Parameters:
        S - The service type
        Parameters:
        clazz - The service class
        Returns:
        Available services of type S