Class SocketPerformancePreferences
- java.lang.Object
-
- org.apache.logging.log4j.core.net.SocketPerformancePreferences
-
- All Implemented Interfaces:
java.lang.Cloneable,Builder<SocketPerformancePreferences>
@Plugin(name="SocketPerformancePreferences", category="Core", printObject=true) public class SocketPerformancePreferences extends java.lang.Object implements Builder<SocketPerformancePreferences>, java.lang.Cloneable
Holds all socket options settable viaSocket.setPerformancePreferences(int, int, int).The
Socket.setPerformancePreferences(int, int, int)API may not be implemented by a JRE.
-
-
Constructor Summary
Constructors Constructor Description SocketPerformancePreferences()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(java.net.Socket socket)SocketPerformancePreferencesbuild()Builds the object after all configuration has been set.intgetBandwidth()intgetConnectionTime()intgetLatency()static SocketPerformancePreferencesnewBuilder()voidsetBandwidth(int bandwidth)voidsetConnectionTime(int connectionTime)voidsetLatency(int latency)java.lang.StringtoString()
-
-
-
Method Detail
-
newBuilder
@PluginBuilderFactory public static SocketPerformancePreferences newBuilder()
-
apply
public void apply(java.net.Socket socket)
-
build
public SocketPerformancePreferences build()
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
buildin interfaceBuilder<SocketPerformancePreferences>- Returns:
- the configured instance.
-
getBandwidth
public int getBandwidth()
-
getConnectionTime
public int getConnectionTime()
-
getLatency
public int getLatency()
-
setBandwidth
public void setBandwidth(int bandwidth)
-
setConnectionTime
public void setConnectionTime(int connectionTime)
-
setLatency
public void setLatency(int latency)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-