Class Options<T>

  • public class Options<T>
    extends Object
    Configuration options to be looked up in the Configuration. Unless noted all options are optional and return a default value if the value was not found in the configuration.
    James R. Perkins
    • Field Detail


        public static final Options<Boolean> ENABLE_DEFAULT_EXCEPTION_MAPPER
        An option for enabling or disabling the default exception mapper. By default the default exception mapper is enabled.

        public static final Options<Threshold> ENTITY_MEMORY_THRESHOLD
        An option for the threshold of the EntityOutputStream. The threshold is used to determine when to offload an entity to a file out of memory.

        The default is 5 MB.


        public static final Options<Threshold> ENTITY_FILE_THRESHOLD
        An option for the threshold of the EntityOutputStream to write to a file. A value of -1 indicates no threshold limit.

        The default is 50 MB.

    • Method Detail

      • getValue

        public T getValue()
        Resolves the value from the configuration
        the value or the default value which may be null
      • name

        public String name()
        The key for the property.
        the key for the property
      • hashCode

        public int hashCode()
        hashCode in class Object
      • getProperty

        protected static <T> T getProperty​(String name,
                                           Class<T> returnType,
                                           Supplier<T> dft)
        Checks the Configuration for the property returning the value or the given default.
        name - the name of the property
        returnType - the type of the property
        dft - the default value if the property was not found
        the value found in the configuration or the default value