Class Settings


  • public class Settings
    extends Object
    Settings of AuthleteApi implementation.
    Since:
    2.9
    Author:
    Takahiko Kawasaki
    • Constructor Detail

      • Settings

        public Settings()
    • 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 of setConnectionTimeout() of authlete-java-jaxrs, the value given to setConnectionTimeout() 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 of setReadTimeout() of authlete-java-jaxrs, the value given to setReadTimeout() 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