Class Settings
- java.lang.Object
-
- com.authlete.common.api.Settings
-
public class Settings extends Object
Settings ofAuthleteApi
implementation.- Since:
- 2.9
- Author:
- Takahiko Kawasaki
-
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getConnectionTimeout()
Get the timeout value in milliseconds for socket connection.int
getReadTimeout()
Get the read timeout in milliseconds.Settings
setConnectionTimeout(int timeout)
Set the timeout value in milliseconds for socket connection.Settings
setReadTimeout(int timeout)
Set the read timeout in milliseconds.
-
-
-
Method Detail
-
getConnectionTimeout
public int getConnectionTimeout()
Get the timeout value in milliseconds for socket connection. The default value is 0 and it means an infinite timeout.- Returns:
- The connection timeout value in milliseconds.
-
setConnectionTimeout
public Settings setConnectionTimeout(int timeout)
Set the timeout value in milliseconds for socket connection. A timeout of zero is interpreted as an infinite timeout.JAX-RS Client API has not standardized the way to set a connection timeout value. Therefore, if authlete-java-jaxrs is used as
AuthleteApi
implementation and if the JAX-RS Client implementation is not supported by the implementation ofsetConnectionTimeout()
of authlete-java-jaxrs, the value given tosetConnectionTimeout()
won't have any effect. See README in authlete-java-jaxrs for details.- Parameters:
timeout
- The connection timeout value in milliseconds.- Returns:
this
object.- Throws:
IllegalArgumentException
- The given timeout value is negative.
-
getReadTimeout
public int getReadTimeout()
Get the read timeout in milliseconds.- Returns:
- The read timeout in milliseconds.
- Since:
- 2.10
-
setReadTimeout
public Settings setReadTimeout(int timeout)
Set the read timeout in milliseconds. A timeout of zero is interpreted as an infinite timeout.JAX-RS Client API has not standardized the way to set a read timeout value. Therefore, if authlete-java-jaxrs is used as
AuthleteApi
implementation and if the JAX-RS Client implementation is not supported by the implementation ofsetReadTimeout()
of authlete-java-jaxrs, the value given tosetReadTimeout()
won't have any effect. See README in authlete-java-jaxrs for details.- Parameters:
timeout
- The read timeout in milliseconds.- Returns:
this
object.- Since:
- 2.10
-
-