public final class TcpClientSocketPropertiesBuilder extends Object
TcpClientSocketProperties. Instances can only be obtained using TcpClientSocketProperties.builder().
Default values will be used unless specified.| Modifier and Type | Field and Description |
|---|---|
protected Integer |
clientTimeout |
protected Boolean |
keepAlive |
protected Integer |
linger |
protected Integer |
receiveBufferSize |
protected Integer |
sendBufferSize |
protected Boolean |
sendTcpNoDelay |
| Modifier and Type | Method and Description |
|---|---|
TcpClientSocketProperties |
build() |
TcpClientSocketPropertiesBuilder |
clientTimeout(Integer clientTimeout)
Defines the SO_TIMEOUT value for client sockets.
|
TcpClientSocketPropertiesBuilder |
connectionTimeout(Integer connectionTimeout)
Defines how long to wait for the outbound connection to be created.
|
TcpClientSocketPropertiesBuilder |
keepAlive(Boolean keepAlive)
Defines the SO_KEEPALIVE behaviour for open sockets.
|
TcpClientSocketPropertiesBuilder |
linger(Integer linger)
Defines the SO_LINGER value, related to how long the socket will take to close.
|
TcpClientSocketPropertiesBuilder |
receiveBufferSize(Integer receiveBufferSize)
Defines the size of the buffer to use when receiving data.
|
TcpClientSocketPropertiesBuilder |
sendBufferSize(Integer sendBufferSize)
Defines the size of the buffer to use when sending data.
|
TcpClientSocketPropertiesBuilder |
sendTcpNoDelay(Boolean sendTcpNoDelay)
Defines whether data should be collected or not before sending.
|
protected Integer sendBufferSize
protected Integer receiveBufferSize
protected Integer clientTimeout
protected Boolean sendTcpNoDelay
protected Integer linger
protected Boolean keepAlive
public TcpClientSocketPropertiesBuilder sendBufferSize(Integer sendBufferSize)
TcpSocketProperties.getSendBufferSize().
If not set, transport defaults will be used.sendBufferSize - size of the buffer (in bytes).public TcpClientSocketPropertiesBuilder receiveBufferSize(Integer receiveBufferSize)
TcpSocketProperties.getReceiveBufferSize().
If not set, transport defaults will be used.receiveBufferSize - size of the buffer (in bytes).public TcpClientSocketPropertiesBuilder clientTimeout(Integer clientTimeout)
TcpSocketProperties.getClientTimeout().
If not set, transport defaults will be used.clientTimeout - the timeout (in milliseconds).public TcpClientSocketPropertiesBuilder sendTcpNoDelay(Boolean sendTcpNoDelay)
TcpSocketProperties.getSendTcpNoDelay().
Default value is true.sendTcpNoDelay - whether to send everything or collect datapublic TcpClientSocketPropertiesBuilder linger(Integer linger)
TcpSocketProperties.getLinger().
If not set, transport defaults will be used.linger - timeout (in milliseconds)public TcpClientSocketPropertiesBuilder keepAlive(Boolean keepAlive)
TcpSocketProperties.getKeepAlive().
Default value is true.keepAlive - public TcpClientSocketPropertiesBuilder connectionTimeout(Integer connectionTimeout)
TcpClientSocketProperties.getConnectionTimeout().
Default value is 30000.connectionTimeout - timeout (in milliseconds)public TcpClientSocketProperties build()
TcpClientSocketProperties instance as specified.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.