Class SocketOptions
- java.lang.Object
-
- org.apache.logging.log4j.core.net.SocketOptions
-
- All Implemented Interfaces:
Cloneable
,Builder<SocketOptions>
@Plugin(name="SocketOptions", category="Core", printObject=true) public class SocketOptions extends Object implements Builder<SocketOptions>, Cloneable
Holds all socket options settable viaSocket
methods.
-
-
Constructor Summary
Constructors Constructor Description SocketOptions()
-
Method Summary
-
-
-
Method Detail
-
newBuilder
@PluginBuilderFactory public static SocketOptions newBuilder()
-
apply
public void apply(Socket socket) throws SocketException
- Throws:
SocketException
-
build
public SocketOptions build()
Description copied from interface:Builder
Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
build
in interfaceBuilder<SocketOptions>
- Returns:
- the configured instance.
-
getActualTrafficClass
public Integer getActualTrafficClass()
-
getPerformancePreferences
public SocketPerformancePreferences getPerformancePreferences()
-
getReceiveBufferSize
public Integer getReceiveBufferSize()
-
getRfc1349TrafficClass
public Rfc1349TrafficClass getRfc1349TrafficClass()
-
getSendBufferSize
public Integer getSendBufferSize()
-
getSoLinger
public Integer getSoLinger()
-
getSoTimeout
public Integer getSoTimeout()
-
getTrafficClass
public Integer getTrafficClass()
-
isKeepAlive
public Boolean isKeepAlive()
-
isOobInline
public Boolean isOobInline()
-
isReuseAddress
public Boolean isReuseAddress()
-
isTcpNoDelay
public Boolean isTcpNoDelay()
-
setKeepAlive
public SocketOptions setKeepAlive(boolean keepAlive)
-
setOobInline
public SocketOptions setOobInline(boolean oobInline)
-
setPerformancePreferences
public SocketOptions setPerformancePreferences(SocketPerformancePreferences performancePreferences)
-
setReceiveBufferSize
public SocketOptions setReceiveBufferSize(int receiveBufferSize)
-
setReuseAddress
public SocketOptions setReuseAddress(boolean reuseAddress)
-
setRfc1349TrafficClass
public SocketOptions setRfc1349TrafficClass(Rfc1349TrafficClass trafficClass)
-
setSendBufferSize
public SocketOptions setSendBufferSize(int sendBufferSize)
-
setSoLinger
public SocketOptions setSoLinger(int soLinger)
-
setSoTimeout
public SocketOptions setSoTimeout(int soTimeout)
-
setTcpNoDelay
public SocketOptions setTcpNoDelay(boolean tcpNoDelay)
-
setTrafficClass
public SocketOptions setTrafficClass(int trafficClass)
-
-