Class HttpServerOptionsUtils
java.lang.Object
io.quarkus.vertx.http.runtime.options.HttpServerOptionsUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHolds the result of building server configuration: anHttpServerConfig, optionalServerSSLOptions, and optionalSSLEngineOptionsfor selecting the SSL engine. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intWhen the http port is set to 0, replace it by this value to let Vert.x choose a random portstatic final intWhen the https port is set to 0, replace it by this value to let Vert.x choose a random portstatic final intWhen the management port is set to 0, replace it by this value to let Vert.x choose a random port -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyCommonOptions(io.vertx.core.http.HttpServerConfig config, VertxHttpBuildTimeConfig httpBuildTimeConfig, VertxHttpConfig httpConfig, List<String> websocketSubProtocols, String host, ProxyConfig.ProxyProtocolListener listener) Apply common HTTP server options to anHttpServerConfig.static voidapplyCommonOptionsForManagementInterface(io.vertx.core.http.HttpServerConfig config, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig, ManagementConfig managementConfig, List<String> websocketSubProtocols, ProxyConfig.ProxyProtocolListener listener) Apply common management interface options to anHttpServerConfig.static io.vertx.core.http.HttpServerConfigcreateDomainSocketConfig(VertxHttpBuildTimeConfig buildTimeConfig, VertxHttpConfig httpConfig, List<String> websocketSubProtocols) Create anHttpServerConfigfor a domain socket server, ornullif not enabled.static io.vertx.core.http.HttpServerConfigcreateDomainSocketConfigForManagementInterface(ManagementInterfaceBuildTimeConfig buildTimeConfig, ManagementConfig managementConfig, List<String> websocketSubProtocols) Create anHttpServerConfigfor a management domain socket server, ornullif not enabled.static io.vertx.core.http.HttpServerConfigcreateHttpServerConfig(VertxHttpBuildTimeConfig buildTimeConfig, VertxHttpConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols) Create anHttpServerConfigfor the plain HTTP server.static io.vertx.core.http.HttpServerConfigcreateHttpServerConfigForManagementInterface(ManagementInterfaceBuildTimeConfig buildTimeConfig, ManagementConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols) Create anHttpServerConfigfor the management plain HTTP server.static io.vertx.core.net.ServerSSLOptionscreateServerSslOptions(io.quarkus.tls.TlsConfiguration bucket, io.vertx.core.http.ClientAuth clientAuth) CreateServerSSLOptionsfor a server from a TLS registry configuration and client authentication setting.createSslServerConfig(VertxHttpBuildTimeConfig httpBuildTimeConfig, VertxHttpConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols, io.quarkus.tls.TlsConfigurationRegistry registry) Create anHttpServerConfigandServerSSLOptionsfor the HTTPS server, ornullif SSL should not be enabled.createSslServerConfigForManagementInterface(ManagementInterfaceBuildTimeConfig managementBuildTimeConfig, ManagementConfig managementConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols, io.quarkus.tls.TlsConfigurationRegistry registry) Create anHttpServerConfigandServerSSLOptionsfor the management HTTPS server, ornullif SSL should not be enabled.getCredential(Optional<String> password, Map<String, String> credentials, Optional<String> passwordKey) (package private) static byte[]getFileContent(Path path) getInsecureRequestStrategy(VertxHttpConfig httpConfig, VertxHttpBuildTimeConfig httpBuildConfig, io.quarkus.runtime.LaunchMode launchMode) (package private) static <T> Optional<T> static voidwarnIfProxyProtocolIsNotUsed(String configRoot, ProxyConfig proxyConfig, Set<ProxyConfig.ProxyProtocolListener> startedListeners) Warn when thePROXYprotocol is enabled but none of the listeners it is expected on is started.
-
Field Details
-
RANDOM_PORT_MAIN_HTTP
public static final int RANDOM_PORT_MAIN_HTTPWhen the http port is set to 0, replace it by this value to let Vert.x choose a random port- See Also:
-
RANDOM_PORT_MAIN_TLS
public static final int RANDOM_PORT_MAIN_TLSWhen the https port is set to 0, replace it by this value to let Vert.x choose a random port- See Also:
-
RANDOM_PORT_MANAGEMENT
public static final int RANDOM_PORT_MANAGEMENTWhen the management port is set to 0, replace it by this value to let Vert.x choose a random port- See Also:
-
-
Constructor Details
-
HttpServerOptionsUtils
public HttpServerOptionsUtils()
-
-
Method Details
-
createSslServerConfig
public static HttpServerOptionsUtils.ServerConfig createSslServerConfig(VertxHttpBuildTimeConfig httpBuildTimeConfig, VertxHttpConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols, io.quarkus.tls.TlsConfigurationRegistry registry) throws IOException Create anHttpServerConfigandServerSSLOptionsfor the HTTPS server, ornullif SSL should not be enabled.- Throws:
IOException
-
createSslServerConfigForManagementInterface
public static HttpServerOptionsUtils.ServerConfig createSslServerConfigForManagementInterface(ManagementInterfaceBuildTimeConfig managementBuildTimeConfig, ManagementConfig managementConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols, io.quarkus.tls.TlsConfigurationRegistry registry) throws IOException Create anHttpServerConfigandServerSSLOptionsfor the management HTTPS server, ornullif SSL should not be enabled.- Throws:
IOException
-
createServerSslOptions
public static io.vertx.core.net.ServerSSLOptions createServerSslOptions(io.quarkus.tls.TlsConfiguration bucket, io.vertx.core.http.ClientAuth clientAuth) CreateServerSSLOptionsfor a server from a TLS registry configuration and client authentication setting. -
createHttpServerConfig
public static io.vertx.core.http.HttpServerConfig createHttpServerConfig(VertxHttpBuildTimeConfig buildTimeConfig, VertxHttpConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols) Create anHttpServerConfigfor the plain HTTP server. -
createHttpServerConfigForManagementInterface
public static io.vertx.core.http.HttpServerConfig createHttpServerConfigForManagementInterface(ManagementInterfaceBuildTimeConfig buildTimeConfig, ManagementConfig httpConfig, io.quarkus.runtime.LaunchMode launchMode, List<String> websocketSubProtocols) Create anHttpServerConfigfor the management plain HTTP server. -
createDomainSocketConfig
public static io.vertx.core.http.HttpServerConfig createDomainSocketConfig(VertxHttpBuildTimeConfig buildTimeConfig, VertxHttpConfig httpConfig, List<String> websocketSubProtocols) Create anHttpServerConfigfor a domain socket server, ornullif not enabled. -
createDomainSocketConfigForManagementInterface
public static io.vertx.core.http.HttpServerConfig createDomainSocketConfigForManagementInterface(ManagementInterfaceBuildTimeConfig buildTimeConfig, ManagementConfig managementConfig, List<String> websocketSubProtocols) Create anHttpServerConfigfor a management domain socket server, ornullif not enabled. -
applyCommonOptions
public static void applyCommonOptions(io.vertx.core.http.HttpServerConfig config, VertxHttpBuildTimeConfig httpBuildTimeConfig, VertxHttpConfig httpConfig, List<String> websocketSubProtocols, String host, ProxyConfig.ProxyProtocolListener listener) Apply common HTTP server options to anHttpServerConfig.- Parameters:
listener- the listener the config is for; thePROXYprotocol is enabled on it only whenquarkus.http.proxy.proxy-protocol-listenerscontains it
-
warnIfProxyProtocolIsNotUsed
public static void warnIfProxyProtocolIsNotUsed(String configRoot, ProxyConfig proxyConfig, Set<ProxyConfig.ProxyProtocolListener> startedListeners) Warn when thePROXYprotocol is enabled but none of the listeners it is expected on is started.- Parameters:
configRoot-quarkus.httporquarkus.management
-
applyCommonOptionsForManagementInterface
public static void applyCommonOptionsForManagementInterface(io.vertx.core.http.HttpServerConfig config, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig, ManagementConfig managementConfig, List<String> websocketSubProtocols, ProxyConfig.ProxyProtocolListener listener) Apply common management interface options to anHttpServerConfig. -
getCredential
-
getInsecureRequestStrategy
public static VertxHttpConfig.InsecureRequests getInsecureRequestStrategy(VertxHttpConfig httpConfig, VertxHttpBuildTimeConfig httpBuildConfig, io.quarkus.runtime.LaunchMode launchMode) -
getFileContent
- Throws:
IOException
-
or
-