-
- All Implemented Interfaces:
public abstract class OtaRequest.Builder<B extends OtaRequest.Builder<B, REQ, RESP>, REQ extends OtaRequest<REQ, RESP>, RESP>
-
-
Method Summary
Modifier and Type Method Description OtaRequest.Builder
setTimeout(Integer timeout)
Set the maximal time(in seconds) allowed for the OTA request to finish. abstract REQ
build()
Builds a request. RESP
execute()
Executes a sync call. void
asyncCall(Callback<RESP> callback)
Executes an async call. abstract B
of(REQ request)
Quickly create a builder instance by copying an old request. -
-
Method Detail
-
setTimeout
OtaRequest.Builder setTimeout(Integer timeout)
Set the maximal time(in seconds) allowed for the OTA request to finish.
OTA service would abort this request if its total time cost reaches this threshold. By default this setting's value is 1800 seconds(30 minutes).
- Parameters:
timeout
- the maximal allowed time of OTA request
-
asyncCall
void asyncCall(Callback<RESP> callback)
Executes an async call.
- Parameters:
callback
- the Callback to fetch the response of the call
-
-
-
-