use of org.webpieces.router.impl.mgmt.GuiceWebpiecesListener in project webpieces by deanhiller.
the class ProdRouterModule method configure.
@Override
public void configure(Binder binder) {
binder.bind(BufferPool.class).to(TwoPools.class).asEagerSingleton();
// done with annotation..
// binder.bind(RouterService.class).to(RouterServiceImpl.class).asEagerSingleton();
// binder.bind(AbstractRouterService.class).to(ProdRouterService.class).asEagerSingleton();;
// binder.bind(MetaLoaderProxy.class).to(ProdLoader.class).asEagerSingleton();
// binder.bind(RouteInvoker.class).to(ProdRouteInvoker.class).asEagerSingleton();
// binder.bind(ClassForName.class).to(ProdClassForName.class).asEagerSingleton();
// binder.bind(CompressionCacheSetup.class).to(ProdCompressionCacheSetup.class).asEagerSingleton();;
binder.bind(RouterConfig.class).toInstance(config);
// We write all meta for platform managed beans into ManagedBeanMeta such that 'any' plugin could
// inject ManagedBeanMeta into itself to access and use all that meta data and wrap those beans to modify them
// The properties plugin does this to expose platform beans as well as app beans
ManagedBeanMeta beanMeta = new ManagedBeanMeta();
binder.bind(ManagedBeanMeta.class).toInstance(beanMeta);
binder.bindListener(Matchers.any(), new GuiceWebpiecesListener(beanMeta));
binder.bind(PortConfigLookup.class).toInstance(portLookup);
Validator validator = javax.validation.Validation.buildDefaultValidatorFactory().getValidator();
ExecutableValidator execValidator = validator.forExecutables();
binder.bind(Validator.class).toInstance(validator);
binder.bind(ExecutableValidator.class).toInstance(execValidator);
}
Aggregations