Package io.airlift.http.server
Class HttpServerModule
java.lang.Object
io.airlift.configuration.AbstractConfigurationAwareModule
io.airlift.http.server.HttpServerModule
- All Implemented Interfaces:
com.google.inject.Module,ConfigurationAwareModule
Provides a fully configured instance of an HTTP server,
ready to use with Guice.
Features:
- HTTP/HTTPS
- Basic Auth
- Request logging
- JMX
HttpServerConfig
To enable JMX, an MBeanServer must be bound elsewhere
To enable Basic Auth, a LoginService must be bound elsewhere
To enable HTTPS, HttpServerConfig.isHttpsEnabled() must return true
and HttpsConfig.getKeystorePath()
and HttpsConfig.getKeystorePassword() must return the path to
the keystore containing the SSL cert and the password to the keystore, respectively.
The HTTPS port is specified via HttpsConfig.getHttpsPort().
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.airlift.configuration.AbstractConfigurationAwareModule
buildConfigObject, buildConfigObject, configure, getProperty, install, setConfigurationFactory
-
Field Details
-
REALM_NAME
- See Also:
-
-
Constructor Details
-
HttpServerModule
public HttpServerModule()
-
-
Method Details
-
setup
protected void setup(com.google.inject.Binder binder) - Specified by:
setupin classAbstractConfigurationAwareModule
-