Modifier and Type | Method and Description |
---|---|
long |
getConnectionTimeout()
Gets the connection timeout.
|
long |
getWriteTimeout()
Gets the write timeout value.
|
void |
setConnectionTimeout(long timeout)
Sets the connection timeout.
|
void |
setWriteTimeout(long timeout)
Sets the value of the write timeout for blocking write operations.
|
void setWriteTimeout(long timeout) throws ConfigException
Most write operations are non-blocking and are not affected by this timeout.
On the client, this only constrains the writing of the initial connection request. If it is not possible to complete the write within this time, the connection is closed. This is a default value that can be overridden in the server details used to create the connection.
On the server, this constrains the time to write connection responses and the time to write HTTP responses to requests to the web server.
If not specified then a value of 2 seconds is used.
timeout
- value in milliseconds. If this exceeds one hour
(3600000ms) a warning will be logged and the time-out will be set
to one hour.ConfigException
- if unable to set the propertylong getWriteTimeout()
void setConnectionTimeout(long timeout) throws ConfigException
On the client, the value constrains the time taken to establish a TCP
connection to the server. The
write timeout
constrains the time taken to send the connection request.
The server is responsible for limiting the overall time taken to complete
a connection once it has received the request.
This is a default value that can be overridden in the
ConnectionDetails
or
ServerDetails
used to create the connection.
On the server, the value constrains the time taken to process the connection request and send the response. This includes the time taken to call any configured authentication handlers and look up location details.
If this is not specified then a value of 2 seconds is used.
timeout
- time in milliseconds. If this exceeds one hour (3600000ms)
a warning will be logged and the timeout will be set to one hour.ConfigException
- if unable to set the propertylong getConnectionTimeout()
Copyright © 2016 Push Technology Ltd. All Rights Reserved.