Class BackOffHandler.Initializer
An initializer class to initialize a back-off handler.
Inheritance
Inherited Members
Namespace: Google.Apis.Http
Assembly: Google.Apis.Core.dll
Syntax
public class Initializer
Constructors
Initializer(IBackOff)
Constructs a new initializer by the given back-off.
Declaration
public Initializer(IBackOff backOff)
Parameters
Type | Name | Description |
---|---|---|
IBack |
backOff |
Fields
DefaultHandleExceptionFunc
Default function which handles exception which aren't
System.
Declaration
public static readonly Func<Exception, bool> DefaultHandleExceptionFunc
Field Value
Type | Description |
---|---|
System. |
DefaultHandleUnsuccessfulResponseFunc
Default function which handles server errors (503).
Declaration
public static readonly Func<HttpResponseMessage, bool> DefaultHandleUnsuccessfulResponseFunc
Field Value
Type | Description |
---|---|
System. |
Properties
BackOff
Gets the back-off policy used by this back-off handler.
Declaration
public IBackOff BackOff { get; }
Property Value
Type | Description |
---|---|
IBack |
HandleExceptionFunc
Gets or sets a delegate function which indicates whether this back-off handler should handle an
exception. The default is Default
Declaration
public Func<Exception, bool> HandleExceptionFunc { get; set; }
Property Value
Type | Description |
---|---|
System. |
HandleUnsuccessfulResponseFunc
Gets or sets a delegate function which indicates whether this back-off handler should handle an
abnormal HTTP response. The default is Default
Declaration
public Func<HttpResponseMessage, bool> HandleUnsuccessfulResponseFunc { get; set; }
Property Value
Type | Description |
---|---|
System. |
MaxTimeSpan
Gets or sets the maximum time span to wait. If the back-off instance returns a greater time span than
this value, this handler returns false
to both HandleExceptionAsync
and
HandleResponseAsync
. Default value is 16 seconds per a retry request.
Declaration
public TimeSpan MaxTimeSpan { get; set; }
Property Value
Type | Description |
---|---|
System. |