Package io.dapr.internal.grpc
Class DaprClientGrpcInterceptors
java.lang.Object
io.dapr.internal.grpc.DaprClientGrpcInterceptors
Class to be used as part of your service's client stub interceptor.
Usage: myClientStub = DaprClientGrpcInterceptors.intercept(myClientStub);
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends io.grpc.stub.AbstractStub<T>>
TAdds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(String appId, T client, TimeoutPolicy timeoutPolicy) Adds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(String appId, T client, TimeoutPolicy timeoutPolicy, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
TAdds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(T client) Adds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(T client, TimeoutPolicy timeoutPolicy) Adds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(T client, TimeoutPolicy timeoutPolicy, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.static <T extends io.grpc.stub.AbstractStub<T>>
Tintercept
(T client, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.
-
Constructor Details
-
DaprClientGrpcInterceptors
public DaprClientGrpcInterceptors()
-
-
Method Details
-
intercept
Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
appId
- the appId to be invokedclient
- gRPC client- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(T client) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
client
- gRPC client- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(String appId, T client, TimeoutPolicy timeoutPolicy) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
appId
- the appId to be invokedclient
- gRPC clienttimeoutPolicy
- timeout policy for gRPC call- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(T client, TimeoutPolicy timeoutPolicy) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
client
- gRPC clienttimeoutPolicy
- timeout policy for gRPC call- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(String appId, T client, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
appId
- the appId to be invokedclient
- gRPC clientcontext
- Reactor context for tracing- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(T client, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
client
- gRPC clientcontext
- Reactor context for tracing- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(T client, TimeoutPolicy timeoutPolicy, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
client
- gRPC clienttimeoutPolicy
- timeout policy for gRPC callcontext
- Reactor context for tracing- Returns:
- async client instance with interceptors
-
intercept
public static <T extends io.grpc.stub.AbstractStub<T>> T intercept(String appId, T client, TimeoutPolicy timeoutPolicy, reactor.util.context.ContextView context) Adds all Dapr interceptors to a gRPC async stub.- Type Parameters:
T
- async client type- Parameters:
appId
- the appId to be invokedclient
- gRPC clienttimeoutPolicy
- timeout policy for gRPC callcontext
- Reactor context for tracing- Returns:
- async client instance with interceptors
-