Package org.apache.ivy.core.settings
Class NamedTimeoutConstraint
- java.lang.Object
-
- org.apache.ivy.core.settings.NamedTimeoutConstraint
-
- All Implemented Interfaces:
TimeoutConstraint
public class NamedTimeoutConstraint extends java.lang.Object implements TimeoutConstraint
An implementation ofTimeoutConstraintwhich can be identified by a name
-
-
Constructor Summary
Constructors Constructor Description NamedTimeoutConstraint()NamedTimeoutConstraint(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetConnectionTimeout()java.lang.StringgetName()intgetReadTimeout()voidsetConnectionTimeout(int connectionTimeout)Sets the connection timeout of this timeout constraintvoidsetName(java.lang.String name)voidsetReadTimeout(int readTimeout)Sets the read timeout of this timeout constraint
-
-
-
Method Detail
-
setName
public void setName(java.lang.String name)
-
getName
public java.lang.String getName()
- Returns:
- Returns the name of the timeout constraint
-
getConnectionTimeout
public int getConnectionTimeout()
- Specified by:
getConnectionTimeoutin interfaceTimeoutConstraint- 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
TimeoutConstraintdecide what kind of timeout semantics to use while establishing a connection (for example, some implementations can decide to use some default value).
-
getReadTimeout
public int getReadTimeout()
- Specified by:
getReadTimeoutin interfaceTimeoutConstraint- 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
TimeoutConstraintdecide what kind of timeout semantics to use reading from the resource (for example, some implementations can decide to use some default value).
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
Sets the connection timeout of this timeout constraint- Parameters:
connectionTimeout- The connection timeout in milliseconds.
-
setReadTimeout
public void setReadTimeout(int readTimeout)
Sets the read timeout of this timeout constraint- Parameters:
readTimeout- The read timeout in milliseconds.
-
-