Class Options<T>
java.lang.Object
org.jboss.resteasy.spi.config.Options<T>
- Direct Known Subclasses:
JacksonOptions
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.- Author:
- James R. Perkins
-
Field Summary
Modifier and TypeFieldDescriptionAn option for enabling or disabling the default exception mapper.An option for the threshold of theEntityOutputStream
to write to a file.An option for the threshold of theEntityOutputStream
.An option used to override the temporary directory where entities that exceed theENTITY_MEMORY_THRESHOLD
are stored.An option which allows which HTTP status code should be sent when theSseEventSink.close()
is invoked. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
protected static <T> T
getProperty
(String name, Class<T> returnType, Supplier<T> dft) Checks theConfiguration
for the property returning the value or the given default.getValue()
Resolves the value from the configurationgetValue
(ResteasyConfiguration configuration) Resolves the value from the configurationint
hashCode()
name()
The key for the property.toString()
-
Field Details
-
ENABLE_DEFAULT_EXCEPTION_MAPPER
-
ENTITY_MEMORY_THRESHOLD
An option for the threshold of theEntityOutputStream
. The threshold is used to determine when to offload an entity to a file out of memory.The default is 5 MB.
-
ENTITY_FILE_THRESHOLD
An option for the threshold of theEntityOutputStream
to write to a file. A value of-1
indicates no threshold limit.The default is 50 MB.
-
ENTITY_TMP_DIR
An option used to override the temporary directory where entities that exceed theENTITY_MEMORY_THRESHOLD
are stored.The default is the
java.io.tmpdir
system property. -
SSE_CLOSED_RESPONSE_CODE
An option which allows which HTTP status code should be sent when theSseEventSink.close()
is invoked. In some implementations 200 (OK) is the default. However, RESTEasy prefers 204 (No Content) as no content has been sent the response.The default is 204 - No Content
-
-
Constructor Details
-
Options
-
-
Method Details
-
getValue
Resolves the value from the configuration- Returns:
- the value or the default value which may be
null
-
getValue
Resolves the value from the configuration- Parameters:
configuration
- a configuration used to resolve default values, ifnull
a default resolver will be used- Returns:
- the value or the default value which may be
null
-
name
-
hashCode
-
equals
-
toString
-
getProperty
Checks theConfiguration
for the property returning the value or the given default.- Parameters:
name
- the name of the propertyreturnType
- the type of the propertydft
- the default value if the property was not found- Returns:
- the value found in the configuration or the default value
-