@Plugin(name="SocketOptions", category="Core", printObject=true) public class SocketOptions extends Object implements Builder<SocketOptions>, Cloneable
Socket
methods.Constructor and Description |
---|
SocketOptions() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getErrorPrefix, isValid
@PluginBuilderFactory public static SocketOptions newBuilder()
public void apply(Socket socket) throws SocketException
socket
- The target Socket.SocketException
- if there is an error in the underlying protocol, such as a TCP error.public SocketOptions build()
Builder
build
in interface Builder<SocketOptions>
public Integer getActualTrafficClass()
Socket
.public SocketPerformancePreferences getPerformancePreferences()
public Rfc1349TrafficClass getRfc1349TrafficClass()
Socket
.public SocketOptions setKeepAlive(boolean keepAlive)
keepAlive
- See Socket.setKeepAlive(boolean)
.public SocketOptions setOobInline(boolean oobInline)
oobInline
- See Socket.setOOBInline(boolean)
.public SocketOptions setPerformancePreferences(SocketPerformancePreferences performancePreferences)
performancePreferences
- See Socket.setPerformancePreferences(int, int, int)
.public SocketOptions setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize
- See Socket.setReceiveBufferSize(int)
.public SocketOptions setReuseAddress(boolean reuseAddress)
reuseAddress
- See Socket.setReuseAddress(boolean)
.public SocketOptions setRfc1349TrafficClass(Rfc1349TrafficClass trafficClass)
trafficClass
- See Socket.setTrafficClass(int)
.Socket
.public SocketOptions setSendBufferSize(int sendBufferSize)
sendBufferSize
- See Socket.setSendBufferSize(int)
.public SocketOptions setSoLinger(int soLinger)
soLinger
- See Socket.setSoLinger(boolean, int)
.public SocketOptions setSoTimeout(int soTimeout)
soTimeout
- See Socket.setSoTimeout(int)
.public SocketOptions setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- See Socket.setTcpNoDelay(boolean)
.public SocketOptions setTrafficClass(int trafficClass)
trafficClass
- See Socket.setTrafficClass(int)
. Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.