public sealed interface JexConfig
Jex configuration.
-
Method Summary
Modifier and TypeMethodDescriptionget compression configurationcompression(Consumer<CompressionConfig> consumer) configure compression via consumerReturn the contextPath to use.contextPath(String contextPath) Set the contextPath.whether to disable JexPlugins loaded from ServiceLoaderexecutor()Executor for serving requests.Set executor for serving requests.booleanhealth()Return true to include the health endpoint.health(boolean health) Set to true to include the health endpoint.host()Return the host to bind to.Set the host to bind to.booleanReturn true to ignore trailing slashes.ignoreTrailingSlashes(boolean ignoreTrailingSlashes) Set to true to ignore trailing slashes.Return the JsonService.jsonService(JsonService jsonService) Set the JsonService to use.intport()Return the port to use.port(int port) Set the port to use.renderer(String extension, TemplateRender renderer) Register a template renderer explicitly.Return the template renderers registered by extension.Return the ssl context if https is enabled.sslContext(SSLContext ssl) Enable https with the provided SSLContext.
-
Method Details
-
port
Set the port to use. Defaults to 7001. -
host
Set the host to bind to. -
contextPath
Set the contextPath. -
health
Set to true to include the health endpoint. Defaults to true. -
ignoreTrailingSlashes
Set to true to ignore trailing slashes. Defaults to true. -
jsonService
Set the JsonService to use. -
renderer
Register a template renderer explicitly.- Parameters:
extension- The extension the renderer applies to.renderer- The template render to use for the given extension.
-
executor
Set executor for serving requests. -
executor
Executor executor()Executor for serving requests. Defaults to aExecutors.newVirtualThreadPerTaskExecutor() -
port
int port()Return the port to use. -
host
String host()Return the host to bind to. -
contextPath
String contextPath()Return the contextPath to use. -
health
boolean health()Return true to include the health endpoint. -
ignoreTrailingSlashes
boolean ignoreTrailingSlashes()Return true to ignore trailing slashes. -
jsonService
JsonService jsonService()Return the JsonService. -
sslContext
SSLContext sslContext()Return the ssl context if https is enabled. -
sslContext
Enable https with the provided SSLContext. -
renderers
Map<String,TemplateRender> renderers()Return the template renderers registered by extension. -
compression
configure compression via consumer -
compression
CompressionConfig compression()get compression configuration -
disableSpiPlugins
JexConfig disableSpiPlugins()whether to disable JexPlugins loaded from ServiceLoader
-