Home
last modified time | relevance | path

Searched refs:interceptors (Results 1 – 25 of 84) sorted by relevance

1234

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/internal/bytecode/
DShadowWranglerUnitTest.java20 private Interceptors interceptors; field in ShadowWranglerUnitTest
24 interceptors = new Interceptors(AndroidInterceptors.all()); in setup()
25 shadowWrangler = new ShadowWrangler(ShadowMap.EMPTY, 23, interceptors); in setup()
31 Function<Object,Object> handler = interceptors.getInterceptionHandler(methodSignature); in getInterceptionHandler_whenCallIsNotRecognized_shouldReturnDoNothingHandler()
39 Function<Object,Object> handler = interceptors.getInterceptionHandler(methodSignature); in getInterceptionHandler_whenInterceptingElderOnLinkedHashMap_shouldReturnNonDoNothingHandler()
73 …assertThat(new ShadowWrangler(shadowMap, 18, interceptors).methodInvoked(methodName, false, DummyC… in shadowClassWithSdkRange()
74 …assertThat(new ShadowWrangler(shadowMap, 19, interceptors).methodInvoked(methodName, false, DummyC… in shadowClassWithSdkRange()
76 …assertThat(new ShadowWrangler(shadowMap, 23, interceptors).methodInvoked(methodName, false, DummyC… in shadowClassWithSdkRange()
83 …assertThat(new ShadowWrangler(shadowMap, 19, interceptors).methodInvoked(methodName, false, DummyC… in shadowMethodWithSdkRange()
84 …assertThat(new ShadowWrangler(shadowMap, 20, interceptors).methodInvoked(methodName, false, DummyC… in shadowMethodWithSdkRange()
[all …]
/external/grpc-grpc-java/core/src/main/java/io/grpc/
DServerInterceptors.java44 ServerInterceptor... interceptors) { in interceptForward() argument
45 return interceptForward(serviceDef, Arrays.asList(interceptors)); in interceptForward()
49 ServerInterceptor... interceptors) { in interceptForward() argument
50 return interceptForward(bindableService.bindService(), Arrays.asList(interceptors)); in interceptForward()
64 List<? extends ServerInterceptor> interceptors) { in interceptForward() argument
65 List<? extends ServerInterceptor> copy = new ArrayList<>(interceptors); in interceptForward()
72 List<? extends ServerInterceptor> interceptors) { in interceptForward() argument
73 return interceptForward(bindableService.bindService(), interceptors); in interceptForward()
86 ServerInterceptor... interceptors) { in intercept() argument
87 return intercept(serviceDef, Arrays.asList(interceptors)); in intercept()
[all …]
DClientInterceptors.java44 public static Channel interceptForward(Channel channel, ClientInterceptor... interceptors) { in interceptForward() argument
45 return interceptForward(channel, Arrays.asList(interceptors)); in interceptForward()
58 List<? extends ClientInterceptor> interceptors) { in interceptForward() argument
59 List<? extends ClientInterceptor> copy = new ArrayList<>(interceptors); in interceptForward()
73 public static Channel intercept(Channel channel, ClientInterceptor... interceptors) { in intercept() argument
74 return intercept(channel, Arrays.asList(interceptors)); in intercept()
86 public static Channel intercept(Channel channel, List<? extends ClientInterceptor> interceptors) { in intercept() argument
88 for (ClientInterceptor interceptor : interceptors) { in intercept()
DForwardingChannelBuilder.java73 public T intercept(List<ClientInterceptor> interceptors) { in intercept() argument
74 delegate().intercept(interceptors); in intercept()
79 public T intercept(ClientInterceptor... interceptors) { in intercept() argument
80 delegate().intercept(interceptors); in intercept()
/external/guice/core/src/com/google/inject/internal/
DMethodAspect.java36 private final List<MethodInterceptor> interceptors; field in MethodAspect
48 List<MethodInterceptor> interceptors) { in MethodAspect() argument
51 this.interceptors = checkNotNull(interceptors, "interceptors"); in MethodAspect()
57 MethodInterceptor... interceptors) { in MethodAspect() argument
58 this(classMatcher, methodMatcher, Arrays.asList(interceptors)); in MethodAspect()
69 List<MethodInterceptor> interceptors() { in interceptors() method in MethodAspect
70 return interceptors; in interceptors()
DProxyFactory.java52 private final ImmutableMap<Method, List<MethodInterceptor>> interceptors; field in ProxyFactory
79 interceptors = ImmutableMap.of(); in ProxyFactory()
106 new Object[] {pair.method, methodAspect.interceptors()}); in ProxyFactory()
109 pair.addAll(methodAspect.interceptors()); in ProxyFactory()
116 interceptors = ImmutableMap.of(); in ProxyFactory()
137 ImmutableSet.copyOf(pair.interceptors).asList(); in ProxyFactory()
142 interceptors = in ProxyFactory()
150 return interceptors; in getInterceptors()
155 if (interceptors.isEmpty()) { in create()
175 return new ProxyConstructor<T>(enhancer, injectionPoint, callbacks, interceptors); in create()
[all …]
DInterceptorStackCallback.java43 final MethodInterceptor[] interceptors; field in InterceptorStackCallback
46 public InterceptorStackCallback(Method method, List<MethodInterceptor> interceptors) { in InterceptorStackCallback() argument
48 this.interceptors = interceptors.toArray(new MethodInterceptor[interceptors.size()]); in InterceptorStackCallback()
75 return index == interceptors.length in proceed()
77 : interceptors[index] in proceed()
/external/robolectric-shadows/sandbox/src/main/java/org/robolectric/internal/bytecode/
DInterceptors.java11 private final Map<MethodRef, Interceptor> interceptors = new HashMap<>(); field in Interceptors
13 public Interceptors(Interceptor... interceptors) { in Interceptors() argument
14 this(asList(interceptors)); in Interceptors()
20 this.interceptors.put(methodRef, interceptor); in Interceptors()
26 return interceptors.keySet(); in getAllMethodRefs()
40 Interceptor mh = interceptors.get(new MethodRef(className, methodName)); in findInterceptor()
42 mh = interceptors.get(new MethodRef(className, "*")); in findInterceptor()
/external/guice/core/src/com/google/inject/spi/
DInterceptorBinding.java48 private final ImmutableList<MethodInterceptor> interceptors; field in InterceptorBinding
54 MethodInterceptor[] interceptors) { in InterceptorBinding() argument
58 this.interceptors = ImmutableList.copyOf(interceptors); in InterceptorBinding()
75 return interceptors; in getInterceptors()
90 interceptors.toArray(new MethodInterceptor[interceptors.size()])); in applyTo()
/external/grpc-grpc/src/php/lib/Grpc/
DInterceptor.php76 * @param Interceptor|Interceptor[] $interceptors interceptors to be added
80 public static function intercept($channel, $interceptors) argument
82 if (is_array($interceptors)) {
83 for ($i = count($interceptors) - 1; $i >= 0; $i--) {
84 $channel = new Internal\InterceptorChannel($channel, $interceptors[$i]);
87 $channel = new Internal\InterceptorChannel($channel, $interceptors);
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DInterceptorTest.java68 client.interceptors().add(new Interceptor() { in applicationInterceptorsCanShortCircuitResponses()
243 rewriteRequestToServer(client.interceptors()); in applicationInterceptorsRewriteRequestToServer()
250 private void rewriteRequestToServer(List<Interceptor> interceptors) throws Exception { in rewriteRequestToServer() argument
253 interceptors.add(new Interceptor() { in rewriteRequestToServer()
279 rewriteResponseFromServer(client.interceptors()); in applicationInterceptorsRewriteResponseFromServer()
286 private void rewriteResponseFromServer(List<Interceptor> interceptors) throws Exception { in rewriteResponseFromServer() argument
291 interceptors.add(new Interceptor() { in rewriteResponseFromServer()
312 multipleInterceptors(client.interceptors()); in multipleApplicationInterceptors()
319 private void multipleInterceptors(List<Interceptor> interceptors) throws Exception { in multipleInterceptors() argument
322 interceptors.add(new Interceptor() { in multipleInterceptors()
[all …]
/external/grpc-grpc-java/android-interop-testing/app/src/main/java/io/grpc/android/integrationtest/
DInteropTask.java47 List<ClientInterceptor> interceptors, in InteropTask() argument
51 this.tester = new Tester(channel, interceptors); in InteropTask()
152 private final List<ClientInterceptor> interceptors; field in InteropTask.Tester
154 private Tester(ManagedChannel channel, List<ClientInterceptor> interceptors) { in Tester() argument
156 this.interceptors = interceptors; in Tester()
166 return interceptors.toArray(new ClientInterceptor[0]); in getAdditionalInterceptors()
DTesterActivity.java132 List<ClientInterceptor> interceptors = new ArrayList<>(); in startTest() local
134 interceptors.add(new SafeMethodChannelInterceptor()); in startTest()
136 new InteropTask(this, channel, interceptors, testCase).execute(); in startTest()
/external/grpc-grpc/src/csharp/Grpc.Core/Interceptors/
DServerServiceDefinitionExtensions.cs66 … Intercept(this ServerServiceDefinition serverServiceDefinition, params Interceptor[] interceptors) in Intercept() argument
69 GrpcPreconditions.CheckNotNull(interceptors, nameof(interceptors)); in Intercept()
71 foreach (var interceptor in interceptors.Reverse()) in Intercept()
DCallInvokerExtensions.cs64 … public static CallInvoker Intercept(this CallInvoker invoker, params Interceptor[] interceptors) in Intercept() argument
67 GrpcPreconditions.CheckNotNull(interceptors, nameof(interceptors)); in Intercept()
69 foreach (var interceptor in interceptors.Reverse()) in Intercept()
DChannelExtensions.cs62 public static CallInvoker Intercept(this Channel channel, params Interceptor[] interceptors) in Intercept() argument
64 return new DefaultCallInvoker(channel).Intercept(interceptors); in Intercept()
/external/dexmaker/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/
DMockMethodAdvice.java23 private final Map<Object, InvocationHandlerAdapter> interceptors; field in MockMethodAdvice
31 MockMethodAdvice(Map<Object, InvocationHandlerAdapter> interceptors) { in MockMethodAdvice() argument
32 this.interceptors = interceptors; in MockMethodAdvice()
196 InvocationHandlerAdapter interceptor = interceptors.get(instance); in handle()
213 return interceptors.containsKey(instance); in isMock()
/external/grpc-grpc/src/python/grpcio/grpc/
D_interceptor.py24 def __init__(self, interceptors): argument
25 self.interceptors = tuple(interceptors)
31 if index < len(self.interceptors):
32 interceptor = self.interceptors[index]
42 def service_pipeline(interceptors): argument
43 return _ServicePipeline(interceptors) if interceptors else None
460 def intercept_channel(channel, *interceptors): argument
461 for interceptor in reversed(list(interceptors)):
/external/grpc-grpc/doc/
Dserver_side_auth.md42 Auth interceptors are gRPC components that populate contents of the auth context based on gRPC's in…
43 gRPC comes with some basic "interceptors" already built-in.
46interceptors but you should keep in mind that as auth interceptors essentially decide which RPCs a…
48 #### Available auth interceptors
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DAbstractManagedChannelImplBuilder.java100 private final List<ClientInterceptor> interceptors = new ArrayList<>(); field in AbstractManagedChannelImplBuilder
215 public final T intercept(List<ClientInterceptor> interceptors) { in intercept() argument
216 this.interceptors.addAll(interceptors); in intercept()
221 public final T intercept(ClientInterceptor... interceptors) { in intercept() argument
222 return intercept(Arrays.asList(interceptors)); in intercept()
421 new ArrayList<>(this.interceptors); in getEffectiveInterceptors()
/external/mockito/src/main/java/org/mockito/internal/creation/bytebuddy/
DMockMethodAdvice.java38 final WeakConcurrentMap<Object, MockMethodInterceptor> interceptors; field in MockMethodAdvice
47 …public MockMethodAdvice(WeakConcurrentMap<Object, MockMethodInterceptor> interceptors, String iden… in MockMethodAdvice() argument
48 this.interceptors = interceptors; in MockMethodAdvice()
97 MockMethodInterceptor interceptor = interceptors.get(instance); in handle()
120 return instance != interceptors.target && interceptors.containsKey(instance); in isMock()
328 mockMethodAdvice.interceptors.put(thiz, thiz.getMockitoInterceptor()); in doReadObject()
/external/guice/extensions/struts2/src/com/google/inject/struts2/
DStruts2Factory.java54 private final List<ProvidedInterceptor> interceptors = new ArrayList<>(); field in Struts2Factory
137 for (ProvidedInterceptor interceptor : interceptors) { in createInjector()
144 for (ProvidedInterceptor interceptor : interceptors) { in createInjector()
166 interceptors.add(providedInterceptor); in buildInterceptor()
DGuiceObjectFactory.java49 List<ProvidedInterceptor> interceptors = new ArrayList<>(); field in GuiceObjectFactory
147 for (ProvidedInterceptor interceptor : interceptors) { in createInjector()
154 for (ProvidedInterceptor interceptor : interceptors) { in createInjector()
179 interceptors.add(providedInterceptor); in buildInterceptor()
/external/grpc-grpc/src/ruby/lib/grpc/generic/
Dinterceptor_registry.rb33 def initialize(interceptors = []) argument
35 interceptors.each do |i|
Dinterceptors.rb158 def initialize(interceptors = []) argument
159 @interceptors = interceptors.dup

1234