HTTP Configuration
To create a custom HTTP configuration, use the following code inside declareConfiguration
of your GreenApp:
You can add more configurations by appending them to the last configuration:
Configurations
setHost(String host)
Specify a custom host address for the server.
Support "*" for subnets is enabled, for example "10.*.*.*"
useInsecureServer()
Disable TLS (HTTPS) for this server.
setTLS(TLSCertificates tlsCertificates)
Set a custom TLS certificate object for HTTPS. See here for more information about default TLS certificates.
setClientAuthRequired(boolean b)
Determines if the client requires correct certificates to be allowed to connect to server.
setConcurrentChannelsPerDecryptUnit(int i)
The number of simultaneous stream of decryption for TLS.
setConcurrentChannelsPerEncryptUnit(int i)
The number of simultaneous stream of encryption for TLS.
setDecryptionUnitsPerTrack(int i)
The number of decryption unit required per track. Adjust this higher if e.g. users are sending large files per track.
setEncryptionUnitsPerTrack(int i)
The number of encryption unit required per track. Adjust this higher if more encrypted content is required.
setMaxResponseSize(int i)
The largest response size allowed (in bytes).
setServiceName(String name)
Updates the telemetry graph for debugging purposes.
setDefaultPath(String path)
Set the default relative file path (not folder!) to be served by default (i.e. user connects to 'http://localhost/');
logTraffic(boolean b)
Determines if all requests AND responses should be logged.
setTracks(int t)
The number of parallel tracks for multicore performance.
setMaxConnectionBits(int i)
The number of max connection bits. For example, 12 would be 1 << 12 = 4096 total connections.
setMinConnections(int i)
The number of maximum users that can be reasonable expected. It will be rounded down or up if necessary to be a power of 2.
Last updated