Home
last modified time | relevance | path

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

12345

/external/kotlinx.atomicfu/atomicfu/src/jvmMain/kotlin/kotlinx/atomicfu/
DAtomicFU.kt73 interceptor.beforeUpdate(this) in atomic()
75 interceptor.afterSet(this, value) in atomic()
82 interceptor.beforeUpdate(this) in atomic()
84 interceptor.afterSet(this, value) in atomic()
91 interceptor.beforeUpdate(this) in atomic()
93 if (result) interceptor.afterRMW(this, expect, update) in atomic()
101 interceptor.beforeUpdate(this) in atomic()
103 interceptor.afterRMW(this, oldValue, value) in atomic()
134 interceptor.beforeUpdate(this)
136 interceptor.afterSet(this, value)
[all …]
DInterceptor.kt9 internal var interceptor: AtomicOperationInterceptor = DefaultInterceptor variable
14 if (!interceptorLock.tryLock() || interceptor !== DefaultInterceptor) { in lockAndSetInterceptor()
15 error("Interceptor is locked by another test: $interceptor") in lockAndSetInterceptor()
17 interceptor = impl in lockAndSetInterceptor()
21 check(interceptor === impl) { "Unexpected interceptor found: $interceptor" } in unlockAndResetInterceptor()
22 interceptor = DefaultInterceptor in unlockAndResetInterceptor()
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DServiceConfigInterceptorTest.java63 private final ServiceConfigInterceptor interceptor = new ServiceConfigInterceptor( field in ServiceConfigInterceptorTest
96 interceptor.handleUpdate(serviceConfig); in withWaitForReady()
98 interceptor.interceptCall(methodDescriptor, CallOptions.DEFAULT.withoutWaitForReady(), channel); in withWaitForReady()
106 interceptor.interceptCall(methodDescriptor, CallOptions.DEFAULT.withoutWaitForReady(), channel); in handleUpdateNotCalledBeforeInterceptCall()
122 interceptor.handleUpdate(serviceConfig); in withMaxRequestSize()
124 interceptor.interceptCall(methodDescriptor, CallOptions.DEFAULT, channel); in withMaxRequestSize()
136 interceptor.handleUpdate(serviceConfig); in withMaxRequestSize_pickSmallerExisting()
138 interceptor.interceptCall( in withMaxRequestSize_pickSmallerExisting()
151 interceptor.handleUpdate(serviceConfig); in withMaxRequestSize_pickSmallerNew()
153 interceptor.interceptCall( in withMaxRequestSize_pickSmallerNew()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core/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()
DServerServiceDefinitionExtensions.cs43 …Definition Intercept(this ServerServiceDefinition serverServiceDefinition, Interceptor interceptor) in Intercept() argument
46 GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in Intercept()
47 …erverServiceDefinition.CallHandlers.ToDictionary(x => x.Key, x => x.Value.Intercept(interceptor))); in Intercept()
71 foreach (var interceptor in interceptors.Reverse()) in Intercept()
73 serverServiceDefinition = Intercept(serverServiceDefinition, interceptor); in Intercept()
DChannelExtensions.cs41 public static CallInvoker Intercept(this Channel channel, Interceptor interceptor) in Intercept() argument
43 return new DefaultCallInvoker(channel).Intercept(interceptor); in Intercept()
82 … public static CallInvoker Intercept(this Channel channel, Func<Metadata, Metadata> interceptor) in Intercept() argument
84 return new DefaultCallInvoker(channel).Intercept(interceptor); in Intercept()
/external/grpc-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()
93 readonly Action<ServerCallContext> interceptor; field in Grpc.Core.Interceptors.Tests.ServerInterceptorTest.ServerCallContextInterceptor
95 public ServerCallContextInterceptor(Action<ServerCallContext> interceptor) in ServerCallContextInterceptor() argument
97 GrpcPreconditions.CheckNotNull(interceptor, nameof(interceptor)); in ServerCallContextInterceptor()
98 this.interceptor = interceptor; in ServerCallContextInterceptor()
103 interceptor(context); in UnaryServerHandler()
109 interceptor(context); in ClientStreamingServerHandler()
115 interceptor(context); in ServerStreamingServerHandler()
121 interceptor(context); in DuplexStreamingServerHandler()
/external/grpc-grpc/src/csharp/Grpc.Core/
DCallCredentials.cs49 public static CallCredentials FromInterceptor(AsyncAuthInterceptor interceptor) in FromInterceptor() argument
51 return new MetadataCredentials(interceptor); in FromInterceptor()
67 readonly AsyncAuthInterceptor interceptor; field in Grpc.Core.MetadataCredentials
73 public MetadataCredentials(AsyncAuthInterceptor interceptor) in MetadataCredentials() argument
75 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor); in MetadataCredentials()
80 … NativeMetadataCredentialsPlugin plugin = new NativeMetadataCredentialsPlugin(interceptor); in ToNativeCredentials()
/external/grpc-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;
/external/guice/core/test/com/google/inject/internal/
DProxyFactoryTest.java42 SimpleInterceptor interceptor = new SimpleInterceptor(); in testSimpleCase() local
45 aspects.add(new MethodAspect(any(), any(), interceptor)); in testSimpleCase()
53 assertTrue(interceptor.invoked); in testSimpleCase()
77 SimpleInterceptor interceptor = new SimpleInterceptor(); in testInterceptOneMethod() local
79 aspects.add(new MethodAspect(only(Bar.class), annotatedWith(Intercept.class), interceptor)); in testInterceptOneMethod()
91 assertFalse(interceptor.invoked); in testInterceptOneMethod()
95 assertFalse(interceptor.invoked); in testInterceptOneMethod()
99 assertTrue(interceptor.invoked); in testInterceptOneMethod()
132 SimpleInterceptor interceptor = new SimpleInterceptor(); in testWithConstructorArguments() local
134 aspects.add(new MethodAspect(any(), any(), interceptor)); in testWithConstructorArguments()
[all …]
/external/apache-http/src/org/apache/http/protocol/
DBasicHttpProcessor.java152 void addInterceptor(final HttpRequestInterceptor interceptor) { in addInterceptor() argument
153 addRequestInterceptor(interceptor); in addInterceptor()
157 void addInterceptor(final HttpRequestInterceptor interceptor, in addInterceptor() argument
159 addRequestInterceptor(interceptor, index); in addInterceptor()
205 void addInterceptor(final HttpResponseInterceptor interceptor) { in addInterceptor() argument
206 addResponseInterceptor(interceptor); in addInterceptor()
209 public final void addInterceptor(final HttpResponseInterceptor interceptor, in addInterceptor() argument
211 addResponseInterceptor(interceptor, index); in addInterceptor()
293 HttpRequestInterceptor interceptor = in process() local
295 interceptor.process(request, context); in process()
[all …]
/external/grpc-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)
/external/robolectric-shadows/sandbox/src/main/java/org/robolectric/internal/bytecode/
DInterceptors.java18 for (Interceptor interceptor : interceptorList) { in Interceptors()
19 for (MethodRef methodRef : interceptor.getMethodRefs()) { in Interceptors()
20 this.interceptors.put(methodRef, interceptor); in Interceptors()
30 … Interceptor interceptor = findInterceptor(methodSignature.className, methodSignature.methodName); in getInterceptionHandler() local
31 if (interceptor != null) { in getInterceptionHandler()
32 return interceptor.handle(methodSignature); in getInterceptionHandler()
/external/perfetto/docs/instrumentation/
Dinterceptors.md3 A trace packet interceptor is used to redirect trace packets written by a
5 service. For example, the console interceptor prints all trace packets to the
9 An interceptor is defined by subclassing the `perfetto::Interceptor` template:
18 // tracked by the interceptor (e.g., see ThreadLocalState).
24 // below for how to safely access shared interceptor data from here.
33 An interceptor should be registered before any tracing sessions are started.
34 Note that the interceptor also needs to be activated through the trace config
43 Finally, an interceptor is enabled through the trace config like this:
52 Once an interceptor is enabled, all data from the affected data sources is
53 sent to the interceptor instead of the main tracing buffer.
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/
DClientInterceptorsTest.java95 ClientInterceptor interceptor = in channelAndInterceptorCalled() local
97 Channel intercepted = ClientInterceptors.intercept(channel, interceptor); in channelAndInterceptorCalled()
102 verify(interceptor).interceptCall(same(method), same(callOptions), Mockito.<Channel>any()); in channelAndInterceptorCalled()
103 verifyNoMoreInteractions(channel, interceptor); in channelAndInterceptorCalled()
107 verify(interceptor, times(2)) in channelAndInterceptorCalled()
109 verifyNoMoreInteractions(channel, interceptor); in channelAndInterceptorCalled()
114 ClientInterceptor interceptor = new ClientInterceptor() { in callNextTwice() local
125 Channel intercepted = ClientInterceptors.intercept(channel, interceptor); in callNextTwice()
220 ClientInterceptor interceptor = in callOptions() local
230 Channel intercepted = ClientInterceptors.intercept(channel, interceptor); in callOptions()
[all …]
/external/grpc-grpc-java/core/src/main/java/io/grpc/
DClientInterceptors.java88 for (ClientInterceptor interceptor : interceptors) { in intercept()
89 channel = new InterceptorChannel(channel, interceptor); in intercept()
99 final ClientInterceptor interceptor, in wrapClientInterceptor() argument
109 interceptor.interceptCall(wrappedMethod, callOptions, next); in wrapClientInterceptor()
146 private final ClientInterceptor interceptor;
148 private InterceptorChannel(Channel channel, ClientInterceptor interceptor) {
150 this.interceptor = Preconditions.checkNotNull(interceptor, "interceptor");
156 return interceptor.interceptCall(method, callOptions, channel);
DInternalServerInterceptors.java25 ServerInterceptor interceptor, ServerCallHandler<ReqT, RespT> callHandler) { in interceptCallHandler() argument
26 return ServerInterceptors.InterceptCallHandler.create(interceptor, callHandler); in interceptCallHandler()
37 ServerInterceptor interceptor, ServerCallHandler<ReqT, RespT> callHandler) { in interceptCallHandlerCreate() argument
38 return ServerInterceptors.InterceptCallHandler.create(interceptor, callHandler); in interceptCallHandlerCreate()
DServerInterceptors.java204 for (ServerInterceptor interceptor : interceptors) { in wrapAndAddMethod()
205 callHandler = InterceptCallHandler.create(interceptor, callHandler); in wrapAndAddMethod()
212 ServerInterceptor interceptor, ServerCallHandler<ReqT, RespT> callHandler) { in create() argument
213 return new InterceptCallHandler<ReqT, RespT>(interceptor, callHandler); in create()
216 private final ServerInterceptor interceptor; field in ServerInterceptors.InterceptCallHandler
220 ServerInterceptor interceptor, ServerCallHandler<ReqT, RespT> callHandler) { in InterceptCallHandler() argument
221 this.interceptor = Preconditions.checkNotNull(interceptor, "interceptor"); in InterceptCallHandler()
229 return interceptor.interceptCall(call, headers, callHandler); in startCall()
/external/grpc-grpc/src/python/grpcio/grpc/
D_interceptor.py32 interceptor = self.interceptors[index]
34 return interceptor.intercept_service(thunk, context)
191 def __init__(self, thunk, method, interceptor): argument
194 self._interceptor = interceptor
257 def __init__(self, thunk, method, interceptor): argument
260 self._interceptor = interceptor
284 def __init__(self, thunk, method, interceptor): argument
287 self._interceptor = interceptor
365 def __init__(self, thunk, method, interceptor): argument
368 self._interceptor = interceptor
[all …]
/external/javassist/src/test/testproxy/
DProxyTester.java66 Interceptor1 interceptor = new Interceptor1(); in testTarget() local
72 ((Proxy)obj).setHandler(interceptor); in testTarget()
88 assertEquals(14, interceptor.counter); in testTarget()
94 Interceptor1 interceptor = new Interceptor1(); in testTarget1() local
99 ((Proxy)obj).setHandler(interceptor); in testTarget1()
101 assertEquals(1, interceptor.counter); in testTarget1()
106 Interceptor1 interceptor = new Interceptor1(); in testObject() local
111 ((Proxy)obj).setHandler(interceptor); in testObject()
113 assertEquals(2, interceptor.counter); in testObject()
119 Interceptor1 interceptor = new Interceptor1(); in testSetter() local
[all …]
/external/grpc-grpc/src/csharp/Grpc.Core/Internal/
DNativeMetadataCredentialsPlugin.cs35 AsyncAuthInterceptor interceptor; field in Grpc.Core.Internal.NativeMetadataCredentialsPlugin
40 public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) in NativeMetadataCredentialsPlugin() argument
42 this.interceptor = GrpcPreconditions.CheckNotNull(interceptor, "interceptor"); in NativeMetadataCredentialsPlugin()
81 await interceptor(context, metadata).ConfigureAwait(false); in GetMetadataAsync()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/flow/
DOnCompletionInterceptedReleaseTest.kt17 val interceptor = CountingInterceptor() in <lambda>() constant
18 val job = launch(interceptor, start = CoroutineStart.UNDISPATCHED) { in <lambda>()
29 assertEquals(interceptor.intercepted, interceptor.released) in <lambda>()
/external/guice/jdk8-tests/test/com/google/inject/jdk8/
DDefaultMethodInterceptionTest.java44 private final MethodInterceptor interceptor = field in DefaultMethodInterceptionTest
83 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod()
101 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_calledByAnotherMethod()
130 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_whenParentClassDefinesNonInterceptedMethod()
166 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_whenParentClassDefinesInterceptedMethod()
200 bindInterceptor(Matchers.subclassesOf(Baz.class), Matchers.any(), interceptor); in testInterception_ofAllMethodsOnType()
219 bindInterceptor(Matchers.subclassesOf(BazImpl.class), Matchers.any(), interceptor); in testInterception_ofAllMethodsOnType_interceptsInheritedDefaultMethod()

12345