@Test public void testReactorTypes() throws Throwable { Retry retry = Retry.ofDefaults("test"); when(proceedingJoinPoint.proceed()).thenReturn(Single.just("Test")); assertThat(rxJava2RetryAspectExt.handle(proceedingJoinPoint, retry, "testMethod")) .isNotNull(); when(proceedingJoinPoint.proceed()).thenReturn(Flowable.just("Test")); assertThat(rxJava2RetryAspectExt.handle(proceedingJoinPoint, retry, "testMethod")) .isNotNull(); }
@Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName) throws Throwable { RetryTransformer<?> retryTransformer = RetryTransformer.of(retry); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(retryTransformer, returnValue); }
RxJava2RetryAspectExt implements RetryAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName) throws Throwable { RetryTransformer<?> retryTransformer = RetryTransformer.of(retry); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(retryTransformer, returnValue); } }
RxJava2RetryAspectExt implements RetryAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName) throws Throwable { RetryTransformer<?> retryTransformer = RetryTransformer.of(retry); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(retryTransformer, returnValue); }  }
RxJava2RetryAspectExt implements RetryAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName) throws Throwable { RetryTransformer<?> retryTransformer = RetryTransformer.of(retry); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(retryTransformer, returnValue); }  @SuppressWarnings("unchecked") @Override boolean canHandleReturnType(Class returnType); @Override Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName); }
RxJava2RetryAspectExt implements RetryAspectExt { @Override public Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName) throws Throwable { RetryTransformer<?> retryTransformer = RetryTransformer.of(retry); Object returnValue = proceedingJoinPoint.proceed(); return executeRxJava2Aspect(retryTransformer, returnValue); }  @SuppressWarnings("unchecked") @Override boolean canHandleReturnType(Class returnType); @Override Object handle(ProceedingJoinPoint proceedingJoinPoint, Retry retry, String methodName);  }