public class DefaultConnectionConfiguration extends Object implements ConnectionConfiguration
| Constructor and Description |
|---|
DefaultConnectionConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
int |
connectionTimeoutTCPMillis() |
DefaultConnectionConfiguration |
connectionTimeoutTCPMillis(int connectionTimeoutTCPMillis) |
DefaultConnectionConfiguration |
forceTCP()
Set to true if the communication should be TCP, default is UDP for routing.
|
DefaultConnectionConfiguration |
forceTCP(boolean forceTCP) |
DefaultConnectionConfiguration |
forceUDP()
Set to true if the communication should be UDP, default is TCP for request.
|
DefaultConnectionConfiguration |
forceUDP(boolean forceUDP) |
int |
idleTCPSeconds() |
DefaultConnectionConfiguration |
idleTCPSeconds(int idleTCPSeconds) |
int |
idleUDPSeconds() |
DefaultConnectionConfiguration |
idleUDPSeconds(int idleUDPSeconds) |
boolean |
isForceTCP() |
boolean |
isForceUDP() |
int |
slowResponseTimeoutSeconds() |
DefaultConnectionConfiguration |
slowResponseTimeoutSeconds(int slowResponseTimeoutSeconds) |
public int idleTCPSeconds()
idleTCPSeconds in interface ConnectionConfigurationpublic DefaultConnectionConfiguration idleTCPSeconds(int idleTCPSeconds)
idleTCPSeconds - The time that a connection can be idle before its considered not active for short-lived connectionspublic int idleUDPSeconds()
idleUDPSeconds in interface ConnectionConfigurationpublic DefaultConnectionConfiguration idleUDPSeconds(int idleUDPSeconds)
idleUDPSeconds - The time that a connection can be idle before its considered not active for short-lived connectionspublic int connectionTimeoutTCPMillis()
connectionTimeoutTCPMillis in interface ConnectionConfigurationpublic DefaultConnectionConfiguration connectionTimeoutTCPMillis(int connectionTimeoutTCPMillis)
connectionTimeoutTCPMillis - The time a TCP connection is allowed to be establishedpublic boolean isForceTCP()
isForceTCP in interface ConnectionConfigurationpublic DefaultConnectionConfiguration forceTCP(boolean forceTCP)
forceTCP - Set to true if the communication should be TCP, default is UDP for routingpublic DefaultConnectionConfiguration forceTCP()
public boolean isForceUDP()
isForceUDP in interface ConnectionConfigurationpublic DefaultConnectionConfiguration forceUDP(boolean forceUDP)
forceUDP - Set to true if the communication should be UDP, default is TCP for requestpublic DefaultConnectionConfiguration forceUDP()
public int slowResponseTimeoutSeconds()
slowResponseTimeoutSeconds in interface ConnectionConfigurationpublic DefaultConnectionConfiguration slowResponseTimeoutSeconds(int slowResponseTimeoutSeconds)
slowResponseTimeoutSeconds - the amount of seconds a requester waits for the final answer of a
slow peer. If the slow peer does not answer within this time, the request fails. Make sure
that this timeout is smaller than the maximum buffer age at the relay peer. Otherwise, a
timeout is very likely.Copyright © 2014. All rights reserved.