- java.lang.Object
-
- swim.io.SocketSettings
-
- All Implemented Interfaces:
swim.codec.Debug
public class SocketSettings extends Object implements swim.codec.Debug
Socket configuration parameters.
-
-
Field Summary
Fields Modifier and Type Field Description protected TcpSettingstcpSettingsprotected TlsSettingstlsSettings
-
Constructor Summary
Constructors Constructor Description SocketSettings(TcpSettings tcpSettings, TlsSettings tlsSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEqual(Object other)Returnstrueif theseSocketSettingscan possibly equal someotherobject.voidconfigure(Socket socket)Configures thesocketwith theseSocketSettings.protected SocketSettingscopy(TcpSettings tcpSettings, TlsSettings tlsSettings)Returns a newSocketSettingsinstance with the given options.voiddebug(swim.codec.Output<?> output)booleanequals(Object other)static swim.structure.Form<SocketSettings>form()Returns the structuralFormofSocketSettings.static SocketSettingsfrom(TcpSettings tcpSettings)static SocketSettingsfrom(TlsSettings tlsSettings)inthashCode()static SocketSettingsstandard()Returns the defaultSocketSettingsinstance.TcpSettingstcpSettings()Returns the TCP socket configuration.SocketSettingstcpSettings(TcpSettings tcpSettings)Returns a copy of theseSocketSettingsconfigured with the giventcpSettings.TlsSettingstlsSettings()Returns the TLS socket configuration.SocketSettingstlsSettings(TlsSettings tlsSettings)Returns a copy of theseSocketSettingsconfigured with the giventlsSettings.StringtoString()swim.structure.ValuetoValue()Returns a structuralValuerepresenting theseSocketSettings.
-
-
-
Field Detail
-
tcpSettings
protected final TcpSettings tcpSettings
-
tlsSettings
protected final TlsSettings tlsSettings
-
-
Constructor Detail
-
SocketSettings
public SocketSettings(TcpSettings tcpSettings, TlsSettings tlsSettings)
-
-
Method Detail
-
tcpSettings
public TcpSettings tcpSettings()
Returns the TCP socket configuration.
-
tcpSettings
public SocketSettings tcpSettings(TcpSettings tcpSettings)
Returns a copy of theseSocketSettingsconfigured with the giventcpSettings.
-
tlsSettings
public TlsSettings tlsSettings()
Returns the TLS socket configuration.
-
tlsSettings
public SocketSettings tlsSettings(TlsSettings tlsSettings)
Returns a copy of theseSocketSettingsconfigured with the giventlsSettings.
-
copy
protected SocketSettings copy(TcpSettings tcpSettings, TlsSettings tlsSettings)
Returns a newSocketSettingsinstance with the given options. Subclasses may override this method to ensure the proper class is instantiated when updating settings.
-
configure
public void configure(Socket socket) throws SocketException
Configures thesocketwith theseSocketSettings.- Throws:
SocketException
-
toValue
public swim.structure.Value toValue()
Returns a structuralValuerepresenting theseSocketSettings.
-
canEqual
public boolean canEqual(Object other)
Returnstrueif theseSocketSettingscan possibly equal someotherobject.
-
debug
public void debug(swim.codec.Output<?> output)
- Specified by:
debugin interfaceswim.codec.Debug
-
standard
public static SocketSettings standard()
Returns the defaultSocketSettingsinstance.
-
from
public static SocketSettings from(TcpSettings tcpSettings)
-
from
public static SocketSettings from(TlsSettings tlsSettings)
-
form
@Kind public static swim.structure.Form<SocketSettings> form()
Returns the structuralFormofSocketSettings.
-
-