<T> T createController(MethodAction actionMethod) { Class<T> type = actionMethod.type(); if (!injectionContext.contains(type)) { injectionContext.inject(type).as(type); } try { return injectionContext.get(type); } catch (Exception e) { throw new ActionException( e, "Failed to create controller %s: %s", type.toString(), e.getMessage()); } }
@Override public void start(UpdatableInjectionContext injectionContext) { InterceptorRegistry interceptorRegistry = injectionContext.get(InterceptorRegistry.class); interceptorRegistry.registerInterceptor(JobProcessor.class, new JobProcessorInterceptor()); ObjectifyService.register(JobStatus.class); }
@Override public void initialise(UpdatableInjectionContext injectionContext) { super.initialise(injectionContext); injectionContext.inject(JobQueueImpl.class).as(JobQueue.class); }