RequestTimeoutException

- Added method `getFuture()` and `getTimeout()`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-09-25 14:13:01 +02:00
parent f78993ad22
commit b240250611

View File

@ -41,4 +41,27 @@ public final class RequestTimeoutException : CoapClientException
this.future = future;
this.timeout = timeout;
}
/**
* Returns the future request which timed
* out and cause dthis exception to throw
* in the first place
*
* Returns: the `CoapRequestFuture`
*/
public CoapRequestFuture getFuture()
{
return this.future;
}
/**
* Returns the timeout period which
* was exceeded
*
* Returns: the `Duration`
*/
public Duration getTimeout()
{
return this.timeout;
}
}