Package 

Class OtaRequest.Builder

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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
      • build

         abstract REQ build()

        Builds a request.

      • asyncCall

         void asyncCall(Callback<RESP> callback)

        Executes an async call.

        Parameters:
        callback - the Callback to fetch the response of the call
      • of

         abstract B of(REQ request)

        Quickly create a builder instance by copying an old request.