RequestUtil
  public
  
  
  
  class
  RequestUtil
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.util.RequestUtil | 
可讓您透過錯誤處理機制重試網路要求的工具。
摘要
| 公用建構函式 | |
|---|---|
| 
      RequestUtil()
       | |
| 公用方法 | |
|---|---|
| 
        
        
        static
        
        <T>
        T | 
      requestWithBackoff(使用輪詢參數呼叫指定的要求。 | 
| 
        
        
        static
        
        <T>
        T | 
      requestWithBackoff(使用輪詢參數呼叫指定的要求。 | 
| 
        
        
        static
        
        <T>
        T | 
      requestWithBackoff(使用輪詢參數呼叫指定的要求。 | 
公用建構函式
RequestUtil
public RequestUtil ()
公用方法
requestWithBackoff
public static T requestWithBackoff (requestMethod) 
使用輪詢參數呼叫指定的要求。
使用部分預設的時間參數。
| 參數 | |
|---|---|
| requestMethod | :呼叫用於提出要求的方法 | 
| 傳回 | |
|---|---|
| T | |
requestWithBackoff
public static T requestWithBackoff (requestMethod, int minWaitMSec, int maxWaitMSec, int scalingFactor) 
使用輪詢參數呼叫指定的要求。
| 參數 | |
|---|---|
| requestMethod | :呼叫用於提出要求的方法 | 
| minWaitMSec | int:請求之間最短的等待時間 | 
| maxWaitMSec | int:兩次要求之間的最長等待時間 | 
| scalingFactor | int:失敗要求的等待時間要乘以的倍數 | 
| 傳回 | |
|---|---|
| T | |
requestWithBackoff
public static T requestWithBackoff (requestMethod, int minWaitMSec, int maxWaitMSec, int scalingFactor, IRunUtil runUtil) 
使用輪詢參數呼叫指定的要求。
| 參數 | |
|---|---|
| requestMethod | :呼叫用於提出要求的方法 | 
| minWaitMSec | int:請求之間最短的等待時間 | 
| maxWaitMSec | int:兩次要求之間的最長等待時間 | 
| scalingFactor | int:失敗要求的等待時間要乘以的倍數 | 
| runUtil | IRunUtil:要使用的睡眠公用程式 | 
| 傳回 | |
|---|---|
| T | |
