use of com.netflix.conductor.interceptors.ServiceInterceptor in project conductor by Netflix.
the class WorkflowBulkServiceTest method before.
@Before
public void before() {
workflowExecutor = Mockito.mock(WorkflowExecutor.class);
Injector injector = Guice.createInjector(new AbstractModule() {
@Override
protected void configure() {
bind(WorkflowExecutor.class).toInstance(workflowExecutor);
install(new ValidationModule());
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
}
});
workflowBulkService = injector.getInstance(WorkflowBulkServiceImpl.class);
}
use of com.netflix.conductor.interceptors.ServiceInterceptor in project conductor by Netflix.
the class ServerModule method configure.
@Override
protected void configure() {
install(new CoreModule());
install(new ValidationModule());
install(new ArchaiusModule());
install(new JettyModule());
install(new GRPCModule());
install(new EventModule());
bindInterceptor(Matchers.any(), Matchers.annotatedWith(Service.class), new ServiceInterceptor(getProvider(Validator.class)));
bind(Configuration.class).to(SystemPropertiesConfiguration.class).in(Scopes.SINGLETON);
bind(ExecutorService.class).toProvider(ExecutorServiceProvider.class).in(Scopes.SINGLETON);
bind(WorkflowSweeper.class).asEagerSingleton();
bind(WorkflowMonitor.class).asEagerSingleton();
}
Aggregations