use of org.webpieces.microsvc.client.api.HttpsConfig in project webpieces by deanhiller.
the class GuiceModule method configure.
// This is where you would put the guice bindings you need though generally if done
// right, you won't have much in this file.
// If you need more Guice Modules as you want to scale, just modify ServerMeta which returns
// the list of all the Guice Modules in your application
@SuppressWarnings("rawtypes")
@Override
public void configure(Binder binder) {
log.info("running module");
// all modules have access to adding their own Startable objects to be run on server startup
Multibinder<Startable> uriBinder = Multibinder.newSetBinder(binder, Startable.class);
uriBinder.addBinding().to(PopulateDatabase.class);
Multibinder<ObjectStringConverter> conversionBinder = Multibinder.newSetBinder(binder, ObjectStringConverter.class);
conversionBinder.addBinding().to(EducationEnum.WebConverter.class);
conversionBinder.addBinding().to(RoleEnum.WebConverter.class);
Multibinder<HtmlTagCreator> htmlTagCreators = Multibinder.newSetBinder(binder, HtmlTagCreator.class);
htmlTagCreators.addBinding().to(MyHtmlTagCreator.class);
binder.bind(SomeLibrary.class).to(SomeLibraryImpl.class);
// Must bind a SimpleStorage for plugins to read/save data and render their html pages
binder.bind(SimpleStorage.class).to(SimpleStorageImpl.class).asEagerSingleton();
// Must bind a BackendLogin for the backend plugin(or remove the backend plugin)
binder.bind(BackendLogin.class).to(BackendLoginImpl.class).asEagerSingleton();
// since GlobalAppContext is a singleton, ApplicationContext will be to and will be the same
binder.bind(ApplicationContext.class).to(GlobalAppContext.class).asEagerSingleton();
binder.bind(HttpsConfig.class).toInstance(new HttpsConfig(true));
binder.bind(ClientAssertions.class).to(ClientAssertionsImpl.class).asEagerSingleton();
}
Aggregations