Home
last modified time | relevance | path

Searched refs:interceptor (Results 1 – 25 of 68) sorted by relevance

123

/third_party/grpc/src/csharp/Grpc.Core/Interceptors/
DServerServiceDefinitionExtensions.cs43 …Definition Intercept(this ServerServiceDefinition serverServiceDefinition, Interceptor interceptor) in Intercept() argument
46 GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in Intercept()
48 var binder = new InterceptingServiceBinder(interceptor); in Intercept()
74 foreach (var interceptor in interceptors.Reverse()) in Intercept()
76 serverServiceDefinition = Intercept(serverServiceDefinition, interceptor); in Intercept()
88 readonly Interceptor interceptor; field in Grpc.Core.Interceptors.ServerServiceDefinitionExtensions.InterceptingServiceBinder
90 public InterceptingServiceBinder(Interceptor interceptor) in InterceptingServiceBinder() argument
92 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in InterceptingServiceBinder()
104 …builder.AddMethod(method, (request, context) => interceptor.UnaryServerHandler(request, context, h… in AddMethod()
111 …builder.AddMethod(method, (requestStream, context) => interceptor.ClientStreamingServerHandler(req… in AddMethod()
[all …]
/third_party/grpc/src/objective-c/GRPCClient/
DGRPCInterceptor.m52 // Generate interceptor
79 NSAssert(_nextInterceptor == nil, @"Starting the next interceptor more than once");
80 NSAssert(_factories.count > 0, @"Interceptor manager of transport cannot start next interceptor");
82 NSLog(@"Starting the next interceptor more than once");
101 NSAssert(_nextInterceptor != nil, @"Failed to create interceptor or transport.");
103 NSLog(@"Failed to create interceptor or transport.");
160 /** Notify the next interceptor in the chain to receive more messages */
176 /** Forward initial metadata to the previous interceptor in the chain */
187 /** Forward a received message to the previous interceptor in the chain */
198 /** Forward call close and trailing metadata to the previous interceptor in the chain */
[all …]
/third_party/grpc/src/csharp/Grpc.Core.Api/Interceptors/
DCallInvokerExtensions.cs43 public static CallInvoker Intercept(this CallInvoker invoker, Interceptor interceptor) in Intercept() argument
45 return new InterceptingCallInvoker(invoker, interceptor); in Intercept()
69 foreach (var interceptor in interceptors.Reverse()) in Intercept()
71 invoker = Intercept(invoker, interceptor); in Intercept()
92 …public static CallInvoker Intercept(this CallInvoker invoker, Func<Metadata, Metadata> interceptor) in Intercept() argument
94 return new InterceptingCallInvoker(invoker, new MetadataInterceptor(interceptor)); in Intercept()
99 readonly Func<Metadata, Metadata> interceptor; field in Grpc.Core.Interceptors.CallInvokerExtensions.MetadataInterceptor
104 public MetadataInterceptor(Func<Metadata, Metadata> interceptor) in MetadataInterceptor() argument
106 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in MetadataInterceptor()
114 …uest, TResponse>(context.Method, context.Host, context.Options.WithHeaders(interceptor(metadata)));
DInterceptingCallInvoker.cs31 readonly Interceptor interceptor; field in Grpc.Core.Interceptors.InterceptingCallInvoker
37 public InterceptingCallInvoker(CallInvoker invoker, Interceptor interceptor) in InterceptingCallInvoker() argument
40 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in InterceptingCallInvoker()
48 return interceptor.BlockingUnaryCall( in BlockingUnaryCall()
59 return interceptor.AsyncUnaryCall( in AsyncUnaryCall()
70 return interceptor.AsyncServerStreamingCall( in AsyncServerStreamingCall()
81 return interceptor.AsyncClientStreamingCall( in AsyncClientStreamingCall()
91 return interceptor.AsyncDuplexStreamingCall( in AsyncDuplexStreamingCall()
DChannelExtensions.cs41 public static CallInvoker Intercept(this ChannelBase channel, Interceptor interceptor) in Intercept() argument
43 return channel.CreateCallInvoker().Intercept(interceptor); in Intercept()
82 …public static CallInvoker Intercept(this ChannelBase channel, Func<Metadata, Metadata> interceptor) in Intercept() argument
84 return channel.CreateCallInvoker().Intercept(interceptor); in Intercept()
/third_party/grpc/src/csharp/Grpc.Core.Api/
DCallCredentials.cs48 public static CallCredentials FromInterceptor(AsyncAuthInterceptor interceptor) in FromInterceptor() argument
50 return new AsyncAuthInterceptorCredentials(interceptor); in FromInterceptor()
77 readonly AsyncAuthInterceptor interceptor; field in Grpc.Core.CallCredentials.AsyncAuthInterceptorCredentials
79 public AsyncAuthInterceptorCredentials(AsyncAuthInterceptor interceptor) in AsyncAuthInterceptorCredentials() argument
81 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor); in AsyncAuthInterceptorCredentials()
86 configurator.SetAsyncAuthInterceptorCredentials(state, interceptor); in InternalPopulateConfiguration()
DClientBase.cs154 … readonly Func<IMethod, string, CallOptions, ClientBaseConfigurationInfo> interceptor; field in Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor
159 …nfigurationInterceptor(Func<IMethod, string, CallOptions, ClientBaseConfigurationInfo> interceptor) in ClientBaseConfigurationInterceptor() argument
161 … this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in ClientBaseConfigurationInterceptor()
168 … var newHostAndCallOptions = interceptor(context.Method, context.Host, context.Options);
/third_party/grpc/src/php/lib/Grpc/Internal/
DInterceptorChannel.php28 private $interceptor; variable in Grpc\\Internal\\InterceptorChannel
33 * @param Interceptor $interceptor
35 public function __construct($channel, $interceptor) argument
43 $this->interceptor = $interceptor;
54 return $this->interceptor;
/third_party/grpc/src/ruby/spec/generic/
Dserver_interceptors_spec.rb28 let(:interceptors) { [interceptor] }
36 expect(interceptor).to receive(:request_response)
46 expect(interceptor).to receive(:request_response)
71 expect(interceptor).to receive(:client_streamer)
81 expect(interceptor).to receive(:client_streamer)
106 expect(interceptor).to receive(:server_streamer)
119 expect(interceptor).to receive(:server_streamer)
146 expect(interceptor).to receive(:bidi_streamer)
159 expect(interceptor).to receive(:bidi_streamer)
187 interceptor,
[all …]
Dclient_interceptors_spec.rb18 let(:interceptors_opts) { { interceptors: [interceptor] } }
29 expect(interceptor).to receive(:request_response)
41 expect(interceptor).to receive(:request_response)
56 expect(interceptor).to receive(:client_streamer)
69 expect(interceptor).to receive(:client_streamer)
85 expect(interceptor).to receive(:server_streamer)
101 expect(interceptor).to receive(:server_streamer)
120 expect(interceptor).to receive(:bidi_streamer)
136 expect(interceptor).to receive(:bidi_streamer)
Dinterceptor_registry_spec.rb19 let(:interceptors) { [interceptor] }
30 expect(is.first).to eq interceptor
37 let(:interceptors) { [interceptor, interceptor2, interceptor3] }
46 expect(i).to eq interceptor
/third_party/grpc/src/csharp/Grpc.Core.Tests/Interceptors/
DServerInterceptorTest.cs44 …var interceptor = new ServerCallContextInterceptor(ctx => ctx.RequestHeaders.Add(new Metadata.Entr… in AddRequestHeaderInServerInterceptor()
51 helper.ServiceDefinition = helper.ServiceDefinition.Intercept(interceptor); in AddRequestHeaderInServerInterceptor()
140 readonly Action<ServerCallContext> interceptor; field in Grpc.Core.Interceptors.Tests.ServerInterceptorTest.ServerCallContextInterceptor
142 public ServerCallContextInterceptor(Action<ServerCallContext> interceptor) in ServerCallContextInterceptor() argument
144 GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in ServerCallContextInterceptor()
145 this.interceptor = interceptor; in ServerCallContextInterceptor()
150 interceptor(context); in UnaryServerHandler()
156 interceptor(context); in ClientStreamingServerHandler()
162 interceptor(context); in ServerStreamingServerHandler()
168 interceptor(context); in DuplexStreamingServerHandler()
/third_party/grpc/src/python/grpcio/grpc/
D_interceptor.py32 interceptor = self.interceptors[index]
34 return interceptor.intercept_service(thunk, context)
204 def __init__(self, thunk, method, interceptor): argument
207 self._interceptor = interceptor
306 def __init__(self, thunk, method, interceptor): argument
309 self._interceptor = interceptor
343 def __init__(self, thunk, method, interceptor): argument
346 self._interceptor = interceptor
445 def __init__(self, thunk, method, interceptor): argument
448 self._interceptor = interceptor
[all …]
DBUILD.bazel34 name = "interceptor",
52 ":interceptor",
92 ":interceptor",
/third_party/grpc/src/csharp/Grpc.Core/Internal/
DNativeMetadataCredentialsPlugin.cs33 AsyncAuthInterceptor interceptor; field in Grpc.Core.Internal.NativeMetadataCredentialsPlugin
37 public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) in NativeMetadataCredentialsPlugin() argument
39 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, "interceptor"); in NativeMetadataCredentialsPlugin()
85 await interceptor(context, metadata).ConfigureAwait(false); in GetMetadataAsync()
/third_party/grpc/src/python/grpcio_tests/tests_aio/unit/
Dclient_stream_stream_interceptor_test.py72 interceptor = interceptor_class()
74 interceptors=[interceptor])
109 interceptor.assert_in_final_state(self)
119 interceptor = interceptor_class()
121 interceptors=[interceptor])
151 interceptor.assert_in_final_state(self)
194 for interceptor in interceptors:
195 interceptor.assert_in_final_state(self)
Dserver_interceptor_test.py69 interceptor: aio.ServerInterceptor) -> aio.ServerInterceptor:
77 return await interceptor.intercept_service(continuation,
225 interceptor = _CacheInterceptor({
232 server, stub = await _create_server_stub_pair(interceptor)
237 self.assertEqual(1, len(interceptor.cache_store[42].payload.body))
238 self.assertEqual(interceptor.cache_store[42], response)
243 self.assertEqual(1337, len(interceptor.cache_store[1337].payload.body))
244 self.assertEqual(interceptor.cache_store[1337], response)
247 self.assertEqual(interceptor.cache_store[1337], response)
Dclient_unary_stream_interceptor_test.py75 interceptor = interceptor_class()
83 interceptors=[interceptor])
107 interceptor.assert_in_final_state(self)
116 interceptor = interceptor_class()
124 interceptors=[interceptor])
142 interceptor = interceptor_class()
150 interceptors=[interceptor])
169 interceptor = _UnaryStreamInterceptorWithResponseIterator()
172 interceptors=[interceptor])
191 self.assertEqual(interceptor.response_iterator.response_cnt,
Dclient_stream_unary_interceptor_test.py74 interceptor = interceptor_class()
76 interceptors=[interceptor])
103 interceptor.assert_in_final_state(self)
112 interceptor = interceptor_class()
114 interceptors=[interceptor])
142 interceptor.assert_in_final_state(self)
151 interceptor = interceptor_class()
154 interceptors=[interceptor])
181 interceptor = interceptor_class()
184 interceptors=[interceptor])
[all …]
/third_party/cef/tests/ceftests/
Dv8_unittest.cc1104 Interceptor* interceptor = new Interceptor; in RunObjectInterceptorTest() local
1105 CefRefPtr<CefV8Interceptor> interceptorPtr(interceptor); in RunObjectInterceptorTest()
1108 CefV8Value::CreateObject(nullptr, interceptor); in RunObjectInterceptorTest()
1110 interceptor->object_ = object; in RunObjectInterceptorTest()
1117 EXPECT_TRUE(interceptor->got_set_byname_); in RunObjectInterceptorTest()
1118 interceptor->got_set_byname_.reset(); in RunObjectInterceptorTest()
1123 EXPECT_TRUE(interceptor->got_set_byname_); in RunObjectInterceptorTest()
1124 interceptor->got_set_byname_.reset(); in RunObjectInterceptorTest()
1129 EXPECT_TRUE(interceptor->got_set_byname_); in RunObjectInterceptorTest()
1130 interceptor->got_set_byname_.reset(); in RunObjectInterceptorTest()
[all …]
/third_party/grpc/src/python/grpcio/grpc/experimental/aio/
D_channel.py255 for interceptor in interceptors:
256 if isinstance(interceptor, UnaryUnaryClientInterceptor):
257 self._unary_unary_interceptors.append(interceptor)
258 elif isinstance(interceptor, UnaryStreamClientInterceptor):
259 self._unary_stream_interceptors.append(interceptor)
260 elif isinstance(interceptor, StreamUnaryClientInterceptor):
261 self._stream_unary_interceptors.append(interceptor)
262 elif isinstance(interceptor, StreamStreamClientInterceptor):
263 self._stream_stream_interceptors.append(interceptor)
266 "Interceptor {} must be ".format(interceptor) +
D_interceptor.py590 interceptor = next(interceptors, None)
592 if interceptor:
595 call_or_response = await interceptor.intercept_unary_unary(
665 interceptor = next(interceptors, None)
667 if interceptor:
670 call_or_response_iterator = await interceptor.intercept_unary_stream(
749 interceptor = next(interceptors, None)
751 if interceptor:
754 return await interceptor.intercept_stream_unary(
822 interceptor = next(interceptors, None)
[all …]
/third_party/grpc/src/python/grpcio/grpc/aio/
D_channel.py259 for interceptor in interceptors:
260 if isinstance(interceptor, UnaryUnaryClientInterceptor):
261 self._unary_unary_interceptors.append(interceptor)
262 elif isinstance(interceptor, UnaryStreamClientInterceptor):
263 self._unary_stream_interceptors.append(interceptor)
264 elif isinstance(interceptor, StreamUnaryClientInterceptor):
265 self._stream_unary_interceptors.append(interceptor)
266 elif isinstance(interceptor, StreamStreamClientInterceptor):
267 self._stream_stream_interceptors.append(interceptor)
270 "Interceptor {} must be ".format(interceptor) +
/third_party/grpc/src/objective-c/GRPCClient/private/
DGRPCTransport+Private.m100 /** Forward initial metadata to the previous interceptor in the chain */
111 /** Forward a received message to the previous interceptor in the chain */
122 /** Forward call close and trailing metadata to the previous interceptor in the chain */
129 // no more callbacks should be issued to the previous interceptor
136 /** Forward write completion to the previous interceptor in the chain */
/third_party/grpc/include/grpcpp/impl/codegen/
Dserver_interceptor.h111 auto* interceptor = creator->CreateServerInterceptor(this); in RegisterInterceptors() local
112 if (interceptor != nullptr) { in RegisterInterceptors()
114 std::unique_ptr<experimental::Interceptor>(interceptor)); in RegisterInterceptors()

123