Interface TimeoutConstraint

All Known Implementing Classes:
NamedTimeoutConstraint

public interface TimeoutConstraint
Represents the timeouts that are applicable while dealing with resources.

An example of its usage is dependency resolvers when they are resolving module descriptor and/or are downloading the artifacts.

  • Method Details

    • getConnectionTimeout

      int getConnectionTimeout()
      Returns:
      Returns the timeout, in milliseconds, that's to be used while establishing a connection to a resource. A value greater than zero indicates the specific timeout to be used. A value of 0 indicates no timeout and essentially translates to wait-forever semantics. A value lesser than 0 lets the users of this TimeoutConstraint decide what kind of timeout semantics to use while establishing a connection (for example, some implementations can decide to use some default value).
    • getReadTimeout

      int getReadTimeout()
      Returns:
      Returns the timeout, in milliseconds, that's to be used while reading content from a resource. A value greater than zero indicates the specific timeout to be used. A value of 0 indicates no timeout and essentially translates to wait-forever semantics. A value lesser than 0 lets the users of this TimeoutConstraint decide what kind of timeout semantics to use reading from the resource (for example, some implementations can decide to use some default value).