Builder<SocketConfiguration>public static final class SocketConfiguration.Builder extends java.lang.Object implements Builder<SocketConfiguration>
SocketConfiguration builder class.| Modifier and Type | Method | Description |
|---|---|---|
SocketConfiguration.Builder |
backlog(int backlog) |
Configures a maximum length of the queue of incoming connections on the server
socket.
|
SocketConfiguration.Builder |
bindAddress(java.net.InetAddress bindAddress) |
Configures local address where the server listens on with the server socket.
|
SocketConfiguration |
build() |
Build the instance from this builder.
|
SocketConfiguration.Builder |
port(int port) |
Configures a server port to listen on with the server socket.
|
SocketConfiguration.Builder |
receiveBufferSize(int receiveBufferSize) |
Configures proposed value of the TCP receive window that is advertised to the remote peer on the
server socket.
|
SocketConfiguration.Builder |
ssl(Builder<? extends javax.net.ssl.SSLContext> sslContextBuilder) |
Configures a
SSLContext to use with the server socket. |
SocketConfiguration.Builder |
ssl(javax.net.ssl.SSLContext sslContext) |
Configures a
SSLContext to use with the server socket. |
SocketConfiguration.Builder |
timeoutMillis(int timeoutMillis) |
Configures a server socket timeout in milliseconds or
0 for an infinite timeout. |
public SocketConfiguration.Builder port(int port)
0 then any available ephemeral port will be used.port - the server port of the server socketpublic SocketConfiguration.Builder bindAddress(java.net.InetAddress bindAddress)
null then listens an all local addresses.bindAddress - an address to bind with the server socket; null for all local addressespublic SocketConfiguration.Builder backlog(int backlog)
Default value is SocketConfiguration.DEFAULT_BACKLOG_SIZE.
backlog - a maximum length of the queue of incoming connectionspublic SocketConfiguration.Builder timeoutMillis(int timeoutMillis)
0 for an infinite timeout.timeoutMillis - a server socket timeout in milliseconds or 0public SocketConfiguration.Builder receiveBufferSize(int receiveBufferSize)
If 0 then use implementation default.
receiveBufferSize - a buffer size in bytes of the server socket or 0public SocketConfiguration.Builder ssl(javax.net.ssl.SSLContext sslContext)
SSLContext to use with the server socket. If not null then
the server enforces an SSL communication.sslContext - a SSL context to usepublic SocketConfiguration.Builder ssl(Builder<? extends javax.net.ssl.SSLContext> sslContextBuilder)
SSLContext to use with the server socket. If not null then
the server enforces an SSL communication.sslContextBuilder - a SSL context builder to use; will be built as a first step of this
method executionpublic SocketConfiguration build()
Builderbuild in interface Builder<SocketConfiguration>Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.