Пример #1
0
 <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());
   }
 }
Пример #2
0
  @Override
  public void start(UpdatableInjectionContext injectionContext) {
    InterceptorRegistry interceptorRegistry = injectionContext.get(InterceptorRegistry.class);
    interceptorRegistry.registerInterceptor(JobProcessor.class, new JobProcessorInterceptor());

    ObjectifyService.register(JobStatus.class);
  }
Пример #3
0
 @Override
 public void initialise(UpdatableInjectionContext injectionContext) {
   super.initialise(injectionContext);
   injectionContext.inject(JobQueueImpl.class).as(JobQueue.class);
 }