Package io.helidon.webserver
Class SocketConfiguration.Builder
- java.lang.Object
- 
- io.helidon.webserver.SocketConfiguration.Builder
 
- 
- All Implemented Interfaces:
- Builder<SocketConfiguration>,- Supplier<SocketConfiguration>
 - Enclosing interface:
- SocketConfiguration
 
 public static final class SocketConfiguration.Builder extends Object implements Builder<SocketConfiguration> TheSocketConfigurationbuilder class.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketConfiguration.BuilderallowedCipherSuite(List<String> cipherSuite)Configures allowed SSL cipher suite.SocketConfiguration.Builderbacklog(int backlog)Configures a maximum length of the queue of incoming connections on the server socket.SocketConfiguration.BuilderbindAddress(InetAddress bindAddress)Configures local address where the server listens on with the server socket.SocketConfigurationbuild()Build the instance from this builder.SocketConfiguration.BuilderclientAuth(ClientAuthentication clientAuth)Configures whether client authentication will be required or not.SocketConfiguration.BuilderenabledSSlProtocols(String... protocols)Configures the SSL protocols to enable with the server socket.SocketConfiguration.BuilderenabledSSlProtocols(List<String> protocols)Configures the SSL protocols to enable with the server socket.SocketConfiguration.BuilderinitialBufferSize(int size)Configure initial size of the buffer used to parse HTTP line and headers.SocketConfiguration.BuildermaxChunkSize(int size)Configure maximal size of a chunk to be read from incoming requests.SocketConfiguration.BuildermaxHeaderSize(int size)Maximal number of bytes of all header values combined.SocketConfiguration.BuildermaxInitialLineLength(int length)Maximal number of characters in the initial HTTP line.SocketConfiguration.Builderport(int port)Configures a server port to listen on with the server socket.SocketConfiguration.BuilderreceiveBufferSize(int receiveBufferSize)Configures proposed value of the TCP receive window that is advertised to the remote peer on the server socket.SocketConfiguration.Builderssl(Supplier<? extends SSLContext> sslContextBuilder)Configures aSSLContextto use with the server socket.SocketConfiguration.Builderssl(SSLContext sslContext)Configures aSSLContextto use with the server socket.SocketConfiguration.BuildertimeoutMillis(int timeoutMillis)Configures a server socket timeout in milliseconds or0for an infinite timeout.SocketConfiguration.BuildervalidateHeaders(boolean validate)Configure whether to validate header names.
 
- 
- 
- 
Method Detail- 
portpublic SocketConfiguration.Builder port(int port) Configures a server port to listen on with the server socket. If port is0then any available ephemeral port will be used.- Parameters:
- port- the server port of the server socket
- Returns:
- this builder
 
 - 
bindAddresspublic SocketConfiguration.Builder bindAddress(InetAddress bindAddress) Configures local address where the server listens on with the server socket. Ifnullthen listens an all local addresses.- Parameters:
- bindAddress- an address to bind with the server socket;- nullfor all local addresses
- Returns:
- this builder
 
 - 
backlogpublic SocketConfiguration.Builder backlog(int backlog) Configures a maximum length of the queue of incoming connections on the server socket.Default value is SocketConfiguration.DEFAULT_BACKLOG_SIZE.- Parameters:
- backlog- a maximum length of the queue of incoming connections
- Returns:
- this builder
 
 - 
timeoutMillispublic SocketConfiguration.Builder timeoutMillis(int timeoutMillis) Configures a server socket timeout in milliseconds or0for an infinite timeout.- Parameters:
- timeoutMillis- a server socket timeout in milliseconds or- 0
- Returns:
- this builder
 
 - 
receiveBufferSizepublic SocketConfiguration.Builder receiveBufferSize(int receiveBufferSize) Configures proposed value of the TCP receive window that is advertised to the remote peer on the server socket.If 0then use implementation default.- Parameters:
- receiveBufferSize- a buffer size in bytes of the server socket or- 0
- Returns:
- this builder
 
 - 
sslpublic SocketConfiguration.Builder ssl(SSLContext sslContext) Configures aSSLContextto use with the server socket. If notnullthen the server enforces an SSL communication.- Parameters:
- sslContext- a SSL context to use
- Returns:
- this builder
 
 - 
sslpublic SocketConfiguration.Builder ssl(Supplier<? extends SSLContext> sslContextBuilder) Configures aSSLContextto use with the server socket. If notnullthen the server enforces an SSL communication.- Parameters:
- sslContextBuilder- a SSL context builder to use; will be built as a first step of this method execution
- Returns:
- this builder
 
 - 
clientAuthpublic SocketConfiguration.Builder clientAuth(ClientAuthentication clientAuth) Configures whether client authentication will be required or not.- Parameters:
- clientAuth- client authentication
- Returns:
- this builder
 
 - 
enabledSSlProtocolspublic SocketConfiguration.Builder enabledSSlProtocols(String... protocols) Configures the SSL protocols to enable with the server socket.- Parameters:
- protocols- protocols to enable, if- nullenables the default protocols
- Returns:
- this builder
 
 - 
enabledSSlProtocolspublic SocketConfiguration.Builder enabledSSlProtocols(List<String> protocols) Configures the SSL protocols to enable with the server socket.- Parameters:
- protocols- protocols to enable, if- nullor empty enables the default protocols
- Returns:
- this builder
 
 - 
allowedCipherSuitepublic SocketConfiguration.Builder allowedCipherSuite(List<String> cipherSuite) Configures allowed SSL cipher suite.- Parameters:
- cipherSuite- allowed cipher suite
- Returns:
- this builder
 
 - 
maxHeaderSizepublic SocketConfiguration.Builder maxHeaderSize(int size) Maximal number of bytes of all header values combined. When a bigger value is received, aHttp.Status.BAD_REQUEST_400is returned.Default is 8192- Parameters:
- size- maximal number of bytes of combined header values
- Returns:
- this builder
 
 - 
maxInitialLineLengthpublic SocketConfiguration.Builder maxInitialLineLength(int length) Maximal number of characters in the initial HTTP line.Default is 4096- Parameters:
- length- maximal number of characters
- Returns:
- this builder
 
 - 
maxChunkSizepublic SocketConfiguration.Builder maxChunkSize(int size) Configure maximal size of a chunk to be read from incoming requests. Defaults to8192.- Parameters:
- size- maximal chunk size
- Returns:
- updated builder instance
 
 - 
validateHeaderspublic SocketConfiguration.Builder validateHeaders(boolean validate) Configure whether to validate header names. Defaults totrueto make sure header names are valid strings.- Parameters:
- validate- set to- falseto ignore header validation
- Returns:
- updated builder instance
 
 - 
initialBufferSizepublic SocketConfiguration.Builder initialBufferSize(int size) Configure initial size of the buffer used to parse HTTP line and headers. Defaults to128.- Parameters:
- size- initial buffer size
- Returns:
- updated builder instance
 
 - 
buildpublic SocketConfiguration build() Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<SocketConfiguration>
- Returns:
- instance of the built type
 
 
- 
 
-