public interface Delayer
The submission of the request and receiving the response should be
encapsulated by the two method calls of the Delayer
instance
Delayer d; d.getRequestPermission(); try { // perform request } finally { d.requestFinished(); }
Modifier and Type | Method and Description |
---|---|
long |
getDelay()
Returns the delay (in ms) that this instance typically would introduce
between two consecutive requests.
|
void |
getRequestPermission()
Waits for the permission to perform a new request.
|
void |
requestFinished()
informs the Delayer instance about the finished request.
|
void getRequestPermission() throws InterruptedException
InterruptedException
- if the internal waiting is interrupted.void requestFinished()
long getDelay()
Copyright © 2017–2020. All rights reserved.