Class GuiceComponentFactory<T>

java.lang.Object
ru.vyarus.dropwizard.guice.module.jersey.support.GuiceComponentFactory<T>
Type Parameters:
T - injection type
All Implemented Interfaces:
Supplier<T>

public class GuiceComponentFactory<T> extends Object implements Supplier<T>
Factory simply delegates object resolution to guice context. This allows to respect scopes. But, more importantly, such "bridge" allows to bind guice type lazily.
  • Constructor Details

    • GuiceComponentFactory

      public GuiceComponentFactory(com.google.inject.Injector injector, Class<T> type)
      Create factory.
      Parameters:
      injector - injector
      type - provided service type
  • Method Details