C# 클래스 Google.Apis.Http.BackOffHandler

A thread-safe back-off handler which handles an abnormal HTTP response or an exception with Google.Apis.Util.IBackOff.
상속: IHttpUnsuccessfulResponseHandler, IHttpExceptionHandler
파일 보기 프로젝트 열기: Gainedge/BetterExplorer 1 사용 예제들

공개 메소드들

메소드 설명
BackOffHandler ( IBackOff backOff ) : System

Constructs a new back-off handler with the given back-off.

BackOffHandler ( Initializer initializer ) : System

Constructs a new back-off handler with the given initializer.

HandleExceptionAsync ( Google.Apis.Http.HandleExceptionArgs args ) : Task
HandleResponseAsync ( Google.Apis.Http.HandleUnsuccessfulResponseArgs args ) : Task

보호된 메소드들

메소드 설명
Wait ( System.TimeSpan ts, CancellationToken cancellationToken ) : Task

Waits the given time span. Overriding this method is recommended for mocking purposes.

비공개 메소드들

메소드 설명
HandleAsync ( bool supportsRetry, int currentFailedTry, CancellationToken cancellationToken ) : Task

Handles back-off. In case the request doesn't support retry or the back-off time span is greater than the maximum time span allowed for a request, the handler returns false. Otherwise the current thread will block for x milliseconds (x is defined by the BackOff instance), and this handler returns true.

메소드 상세

BackOffHandler() 공개 메소드

Constructs a new back-off handler with the given back-off.
public BackOffHandler ( IBackOff backOff ) : System
backOff IBackOff The back-off policy.
리턴 System

BackOffHandler() 공개 메소드

Constructs a new back-off handler with the given initializer.
public BackOffHandler ( Initializer initializer ) : System
initializer Initializer
리턴 System

HandleExceptionAsync() 공개 메소드

public HandleExceptionAsync ( Google.Apis.Http.HandleExceptionArgs args ) : Task
args Google.Apis.Http.HandleExceptionArgs
리턴 Task

HandleResponseAsync() 공개 메소드

public HandleResponseAsync ( Google.Apis.Http.HandleUnsuccessfulResponseArgs args ) : Task
args Google.Apis.Http.HandleUnsuccessfulResponseArgs
리턴 Task

Wait() 보호된 메소드

Waits the given time span. Overriding this method is recommended for mocking purposes.
protected Wait ( System.TimeSpan ts, CancellationToken cancellationToken ) : Task
ts System.TimeSpan TimeSpan to wait (and block the current thread).
cancellationToken System.Threading.CancellationToken The cancellation token in case the user wants to cancel the operation in /// the middle.
리턴 Task