/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); }
/** * Returns the current parent injector * * @return */ public Injector getInjector() { if (injector == null) { injector = createInjector(); } return injector; }
/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); bind(WhenJerseyServer.class).to(DefaultWhenJerseyServer.class); } }
protected List<Module> getModules(Vertx vertx) { return Arrays.asList( new GuiceVertxBinder(vertx), new WhenGuiceJerseyBinder(), new GuiceWhenBinder()); }
@Inject public GuiceJerseyServer(JerseyHandler jerseyHandler, VertxContainer container, Provider<JerseyServerOptions> optionsProvider, ServiceLocator locator, Injector injector) { super(jerseyHandler, container, optionsProvider); initBridge(locator, injector); }
/** * This is a workaround for the hk2 bridge limitations * * @param locator the HK2 locator * @param injector the Guice injector */ protected void injectMultibindings(ServiceLocator locator, Injector injector) { injectMultiBindings(locator, injector, new Key<Set<ContainerRequestFilter>>() { }, ContainerRequestFilter.class); injectMultiBindings(locator, injector, new Key<Set<ContainerResponseFilter>>() { }, ContainerResponseFilter.class); injectMultiBindings(locator, injector, new Key<Set<ReaderInterceptor>>() { }, ReaderInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<WriterInterceptor>>() { }, WriterInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<ModelProcessor>>() { }, ModelProcessor.class); }
@Override protected void configure() { bind(GuiceScopeContext.class).to(new TypeLiteral<Context<GuiceScope>>() { }).in(Singleton.class); } });
/** * {@inheritDoc} */ @Override protected void configure() { bind(Vertx.class).toInstance(vertx); } }
/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); bind(WhenJerseyServer.class).to(DefaultWhenJerseyServer.class); } }
/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); }
@Override protected WhenJerseyServer getWhenJerseyServer() { if (injector == null) { injector = com.google.inject.Guice.createInjector(new WhenGuiceJerseyBinder(), new GuiceWhenBinder(), new GuiceVertxBinder(vertx)); } return injector.getInstance(WhenJerseyServer.class); }
@Inject public GuiceJerseyServer(Provider<JerseyHandler> jerseyHandlerProvider, ServiceLocator locator, Injector injector) { super(jerseyHandlerProvider); initBridge(locator, injector); }
/** * This is a workaround for the hk2 bridge limitations * * @param locator the HK2 locator * @param injector the Guice injector */ protected void injectMultibindings(ServiceLocator locator, Injector injector) { injectMultiBindings(locator, injector, new Key<Set<ContainerRequestFilter>>() { }, ContainerRequestFilter.class); injectMultiBindings(locator, injector, new Key<Set<ContainerResponseFilter>>() { }, ContainerResponseFilter.class); injectMultiBindings(locator, injector, new Key<Set<ReaderInterceptor>>() { }, ReaderInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<WriterInterceptor>>() { }, WriterInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<ModelProcessor>>() { }, ModelProcessor.class); injectMultiBindings(locator, injector, new Key<Set<ContainerLifecycleListener>>() { }, ContainerLifecycleListener.class); injectMultiBindings(locator, injector, new Key<Set<ApplicationEventListener>>() { }, ApplicationEventListener.class); injectMultiBindings(locator, injector, new Key<Set<ExceptionMapper>>() { }, ExceptionMapper.class); }
/** * Returns the current parent injector * * @return */ public Injector getInjector() { if (injector == null) { injector = createInjector(); } return injector; }
@Override protected void configure() { bind(GuiceScopeContext.class).to(new TypeLiteral<Context<GuiceScope>>() { }).in(Singleton.class); } });
/** * {@inheritDoc} */ @Override protected void configure() { bind(Vertx.class).toInstance(vertx); } }
/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); bind(WhenJerseyServer.class).to(DefaultWhenJerseyServer.class); } }
/** * Configures a {@link com.google.inject.Binder} via the exposed methods. */ @Override protected void configure() { install(new GuiceJerseyBinder()); }
@Inject public GuiceJerseyServer(JerseyHandler jerseyHandler, VertxContainer container, Provider<JerseyServerOptions> optionsProvider, ServiceLocator locator, Injector injector) { super(jerseyHandler, container, optionsProvider); initBridge(locator, injector); }
/** * This is a workaround for the hk2 bridge limitations * * @param locator the HK2 locator * @param injector the Guice injector */ protected void injectMultibindings(ServiceLocator locator, Injector injector) { injectMultiBindings(locator, injector, new Key<Set<ContainerRequestFilter>>() { }, ContainerRequestFilter.class); injectMultiBindings(locator, injector, new Key<Set<ContainerResponseFilter>>() { }, ContainerResponseFilter.class); injectMultiBindings(locator, injector, new Key<Set<ReaderInterceptor>>() { }, ReaderInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<WriterInterceptor>>() { }, WriterInterceptor.class); injectMultiBindings(locator, injector, new Key<Set<ModelProcessor>>() { }, ModelProcessor.class); injectMultiBindings(locator, injector, new Key<Set<ContainerLifecycleListener>>() { }, ContainerLifecycleListener.class); injectMultiBindings(locator, injector, new Key<Set<ApplicationEventListener>>() { }, ApplicationEventListener.class); injectMultiBindings(locator, injector, new Key<Set<ExceptionMapper>>() { }, ExceptionMapper.class); }