public final class TimeOut extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TimeOut.Adapter
Guarantees that any unmarshalled enum constants effectively are the constant Java instances itself, so that
== can be used form comparison. |
| Constructor and Description |
|---|
TimeOut(long seconds) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
long |
getSeconds() |
int |
hashCode() |
boolean |
isInfinite() |
String |
toString() |
static TimeOut |
valueOf(String timeType)
Factory method creating
TimeOut instances from String value representations (e. g. as used in HTTP Headers.TIMEOUT header). |
public static final TimeOut INFINITE
public final boolean isInfinite()
public final long getSeconds()
Long.MAX_VALUE for infinity. Note that future versions will return null for infinity.public static final TimeOut valueOf(String timeType)
TimeOut instances from String value representations (e. g. as used in HTTP Headers.TIMEOUT header).
Guarantees that INFINITE singleton is returned for "Infinite" string, hence allowing to compare for infinity using ==
comparison.
Example:
TimeOut to = TimeOut.valueOf("Infinite");
if (to == Timeout.INFINITE) { ... }
Copyright © 2008-2014 The java.net WebDAV Project. All Rights Reserved.