public class ConnectionSettings extends Object
Constructor and Description |
---|
ConnectionSettings()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getEnabledSslProtocols()
Returns the names of the protocol versions which are currently enabled for use on this connection.
|
SocketAddress |
getLocalAddress()
Returns the local address to use for connection.
|
int |
getReasonableTransmissionTime()
Returns reasonable transmission time.
|
SocketAddress |
getRemoteAddress()
Returns the remote address to connect to.
|
boolean |
isSslEnabled()
Is SSL enabled?
By default, SSL is disabled.
|
void |
setEnabledSslProtocols(String[] protocols)
Sets the protocol versions enabled for use on this connection.
|
void |
setLocalAddress(SocketAddress localAddress)
Sets the local address to use for connection.
|
void |
setLocalAddress(String host,
int port)
Sets the local address to use for connection.
|
void |
setReasonableTransmissionTime(int reasonableTransmissionTime)
Sets the reasonable transmission time (in percents).
|
void |
setRemoteAddress(SocketAddress remoteAddress)
Sets the remote address to connect to.
|
void |
setRemoteAddress(String host,
int port)
Sets the remote address to connect to.
|
void |
setSslEnabled(boolean sslEnabled)
Set SSL enabled.
|
String |
toString() |
public void setRemoteAddress(SocketAddress remoteAddress)
remoteAddress
- remote address to connect topublic void setRemoteAddress(String host, int port)
host
- remote hostport
- remote portpublic void setLocalAddress(String host, int port)
host
- local hostport
- local portpublic void setLocalAddress(SocketAddress localAddress)
localAddress
- local addresspublic SocketAddress getRemoteAddress()
public SocketAddress getLocalAddress()
public boolean isSslEnabled()
public void setSslEnabled(boolean sslEnabled)
sslEnabled
- enable/disable SSL flag.public String[] getEnabledSslProtocols()
public void setEnabledSslProtocols(String[] protocols)
protocols
- Names of all the protocols to enable.public void setReasonableTransmissionTime(int reasonableTransmissionTime)
reasonableTransmissionTime
- reasonableTransmissionTimepublic int getReasonableTransmissionTime()
Copyright © 2012–2024 Onix Solutions. All rights reserved.