interceptors#

Interceptor classes to use with gRPC services.

Classes:

BatchInterceptor()

Interceptor class to batch gRPC calls.

BatchedFuture(result_cls)

Class implementing gRPC.Future interface.

ErrorStateInterceptor(fluent_error_state)

Interceptor class to check Fluent server error state before gRPC calls are made.

GrpcErrorInterceptor()

Interceptor class to check Fluent server error state before gRPC calls are made.

TracingInterceptor()

Interceptor class to trace gRPC calls.

WrapApiCallInterceptor()

Interceptor class to wrap API calls.

class ansys.fluent.core.services.interceptors.BatchInterceptor#

Bases: UnaryUnaryClientInterceptor

Interceptor class to batch gRPC calls.

Methods:

__init__()

__init__ method of BatchInterceptor class.

intercept_unary_unary(continuation, ...)

Intercept unary-unary call for batch operation.

__init__()#

__init__ method of BatchInterceptor class.

intercept_unary_unary(continuation, client_call_details, request)#

Intercept unary-unary call for batch operation.

class ansys.fluent.core.services.interceptors.BatchedFuture(result_cls)#

Bases: Future

Class implementing gRPC.Future interface.

An instance of BatchedFuture is returned if the gRPC method is queued to be executed in batch later.

Methods:

__init__(result_cls)

__init__ method of BatchedFuture class.

add_done_callback(fn)

Adds a function to be called at completion of the computation.

cancel()

Attempts to cancel the computation.

cancelled()

Describes whether the computation was cancelled.

done()

Describes whether the computation has taken place.

exception([timeout])

Return the exception raised by the computation.

result([timeout])

Returns the result of the computation or raises its exception.

running()

Describes whether the computation is taking place.

traceback([timeout])

Access the traceback of the exception raised by the computation.

__init__(result_cls)#

__init__ method of BatchedFuture class.

add_done_callback(fn)#

Adds a function to be called at completion of the computation.

cancel()#

Attempts to cancel the computation.

cancelled()#

Describes whether the computation was cancelled.

done()#

Describes whether the computation has taken place.

exception(timeout=None)#

Return the exception raised by the computation.

result(timeout=None)#

Returns the result of the computation or raises its exception.

running()#

Describes whether the computation is taking place.

traceback(timeout=None)#

Access the traceback of the exception raised by the computation.

class ansys.fluent.core.services.interceptors.ErrorStateInterceptor(fluent_error_state)#

Bases: UnaryUnaryClientInterceptor

Interceptor class to check Fluent server error state before gRPC calls are made.

Methods:

__init__(fluent_error_state)

__init__ method of ErrorStateInterceptor class.

intercept_unary_unary(continuation, ...)

Intercept unary-unary call for error state checking.

__init__(fluent_error_state)#

__init__ method of ErrorStateInterceptor class.

intercept_unary_unary(continuation, client_call_details, request)#

Intercept unary-unary call for error state checking.

class ansys.fluent.core.services.interceptors.GrpcErrorInterceptor#

Bases: UnaryUnaryClientInterceptor

Interceptor class to check Fluent server error state before gRPC calls are made.

Methods:

intercept_unary_unary(continuation, ...)

Intercept unary-unary call for error state checking.

intercept_unary_unary(continuation, client_call_details, request)#

Intercept unary-unary call for error state checking.

class ansys.fluent.core.services.interceptors.TracingInterceptor#

Bases: UnaryUnaryClientInterceptor

Interceptor class to trace gRPC calls.

Methods:

__init__()

__init__ method of TracingInterceptor class.

intercept_unary_unary(continuation, ...)

Intercept unary-unary call for tracing.

__init__()#

__init__ method of TracingInterceptor class.

intercept_unary_unary(continuation, client_call_details, request)#

Intercept unary-unary call for tracing.

class ansys.fluent.core.services.interceptors.WrapApiCallInterceptor#

Bases: UnaryUnaryClientInterceptor

Interceptor class to wrap API calls.

Methods:

__init__()

__init__ method of WrapApiCallInterceptor class.

intercept_unary_unary(continuation, ...)

Intercept unary-unary call.

__init__()#

__init__ method of WrapApiCallInterceptor class.

intercept_unary_unary(continuation, client_call_details, request)#

Intercept unary-unary call.