@Test public void injectionOfDedicatedPipelines() { Executor first = this.dedicatedInjectionTarget.getFirst(); assertNotNull(first); Statistics firstStatistics = this.dedicatedInjectionTarget.getFirstStatistics(); assertNotNull(firstStatistics); String pipelineName = firstStatistics.getPipelineName(); assertNotNull(pipelineName); assertThat(pipelineName, is(CUSTOM_FIRST)); Executor second = this.dedicatedInjectionTarget.getSecond(); assertNotNull(second); Statistics secondStatistics = this.dedicatedInjectionTarget.getSecondStatistics(); assertNotNull(secondStatistics); pipelineName = secondStatistics.getPipelineName(); assertNotNull(pipelineName); assertThat(pipelineName, is(CUSTOM_SECOND)); }
String getPipelineName(InjectionPoint ip) { Annotated annotated = ip.getAnnotated(); Dedicated dedicated = annotated.getAnnotation(Dedicated.class); String name; if (dedicated != null && !Dedicated.DEFAULT.equals(dedicated.value())) { name = dedicated.value(); } else { name = ip.getMember().getName(); } return name; }
ExecutorServiceExposer { String getPipelineName(InjectionPoint ip) { Annotated annotated = ip.getAnnotated(); Dedicated dedicated = annotated.getAnnotation(Dedicated.class); String name; if (dedicated != null && !Dedicated.DEFAULT.equals(dedicated.value())) { name = dedicated.value(); } else { name = ip.getMember().getName(); } return name; } }
ExecutorServiceExposer { String getPipelineName(InjectionPoint ip) { Annotated annotated = ip.getAnnotated(); Dedicated dedicated = annotated.getAnnotation(Dedicated.class); String name; if (dedicated != null && !Dedicated.DEFAULT.equals(dedicated.value())) { name = dedicated.value(); } else { name = ip.getMember().getName(); } return name; }  }
ExecutorServiceExposer { String getPipelineName(InjectionPoint ip) { Annotated annotated = ip.getAnnotated(); Dedicated dedicated = annotated.getAnnotation(Dedicated.class); String name; if (dedicated != null && !Dedicated.DEFAULT.equals(dedicated.value())) { name = dedicated.value(); } else { name = ip.getMember().getName(); } return name; }  void onRejectedExecution(Runnable r, ThreadPoolExecutor executor); @Produces @Dedicated ExecutorService exposeExecutorService(InjectionPoint ip); @Produces @Dedicated Statistics exposeStatistics(InjectionPoint ip); @Produces List<Statistics> getAllStatistics(); }
ExecutorServiceExposer { String getPipelineName(InjectionPoint ip) { Annotated annotated = ip.getAnnotated(); Dedicated dedicated = annotated.getAnnotation(Dedicated.class); String name; if (dedicated != null && !Dedicated.DEFAULT.equals(dedicated.value())) { name = dedicated.value(); } else { name = ip.getMember().getName(); } return name; }  void onRejectedExecution(Runnable r, ThreadPoolExecutor executor); @Produces @Dedicated ExecutorService exposeExecutorService(InjectionPoint ip); @Produces @Dedicated Statistics exposeStatistics(InjectionPoint ip); @Produces List<Statistics> getAllStatistics();  }