public class TapirElementMethodInterceptor extends Object implements org.aopalliance.intercept.MethodInterceptor
TapirElementMethodInterceptor
wraps a single TapirElement
. It intercepts all method calls in order to handle thrown
exceptions. It retries the method invocation one more time if
WebDriverExceptionOccurrenceBehaviour.shouldRetry(WebDriverException)
returns true. Before retrying the
TapirElement
is queried again.TapirElement
or
List
<TapirElement
>. If so a TapirElementMethodInterceptor
or a
TapirElementListMethodInterceptor
is wrapped around the result.Modifier and Type | Class and Description |
---|---|
static class |
TapirElementMethodInterceptor.CacheKey |
Constructor and Description |
---|
TapirElementMethodInterceptor(Supplier<TapirElement> query,
CacheInvalidator parentCacheInvalidator,
com.google.common.reflect.TypeToken<?> typeToken) |
Modifier and Type | Method and Description |
---|---|
protected Optional<Type> |
getListTypeArgument(ParameterizedType parameterizedType) |
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
protected Object |
invokeReflective(TapirElement tapirElement,
Method method,
Object... args) |
public TapirElementMethodInterceptor(Supplier<TapirElement> query, CacheInvalidator parentCacheInvalidator, com.google.common.reflect.TypeToken<?> typeToken)
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
Throwable
protected Object invokeReflective(TapirElement tapirElement, Method method, Object... args)
protected Optional<Type> getListTypeArgument(ParameterizedType parameterizedType)
Copyright © 2018–2021 b+m Informatik AG. All rights reserved.