Refine search
@Override protected void configure() { bind(StartUpActionsProcessor.class).asEagerSingleton(); bind(ActionManager.class).to(ActionManagerImpl.class).in(Singleton.class); bind(FindActionView.class).to(FindActionViewImpl.class).in(Singleton.class); } }
/** * Convenience method for binding a singleton presenter with its view and its * proxy, when using custom-made proxy classes. * * @param <P> The {@link Presenter} class type. * @param <V> The {@link View} interface type. * @param <Proxy_> The {@link Proxy} type. * @param presenterImpl The {@link Presenter} implementation (a singleton). * @param view The {@link View} interface. * @param viewImpl The {@link View} implementation (a singleton). * @param proxy The {@link Proxy} interface. * @param proxyImpl The {@link Proxy} implementation (a singleton). */ protected <P extends Presenter<?, ?>, V extends View, Proxy_ extends Proxy<P>> void bindPresenterCustomProxy( Class<P> presenterImpl, Class<V> view, Class<? extends V> viewImpl, Class<Proxy_> proxy, Class<? extends Proxy_> proxyImpl) { bind(presenterImpl).in(Singleton.class); bind(viewImpl).in(Singleton.class); bind(proxyImpl).asEagerSingleton(); bind(view).to(viewImpl); bind(proxy).to(proxyImpl); }
@Override protected void configure() { bind(ApplicationPresenter.class).asEagerSingleton(); bind(ApplicationPresenter.MyProxy.class).asEagerSingleton(); bind(ApplicationPresenter.MyView.class).to(ApplicationView.class); } }
protected void bindCommonIntegration() { bind(ITypeResolver.class).to(UiCommonDefaultTypeResolver.class).asEagerSingleton(); bind(FrontendEventsHandlerImpl.class).in(Singleton.class); bind(FrontendFailureEventListener.class).in(Singleton.class); bind(ILogger.class).to(LoggerImpl.class).in(Singleton.class); // User Options bind(OptionsModel.class).in(Singleton.class); bindCommonModelProviders(); bindConsoles(); }
private void bindFrontendInfrastructure() { bind(Frontend.class).in(Singleton.class); requestStaticInjection(Frontend.InstanceHolder.class); bind(VdcOperationManager.class).in(Singleton.class); bind(OperationProcessor.class).in(Singleton.class); bind(CommunicationProvider.class).to(GWTRPCCommunicationProvider.class).in(Singleton.class); bind(XsrfRpcRequestBuilder.class).in(Singleton.class); }
@Override protected void configure() { bind(AuthenticatedUser.class).toProvider(ClientSideAuthProvider.class); bind(RemoteCommandServiceAsync.class).toProvider(RemoteServiceProvider.class).in(Singleton.class); bind(Dispatcher.class).annotatedWith(Remote.class).to(RemoteDispatcher.class).in(Singleton.class); bind(DispatchEventSource.class).to(CacheManager.class); bind(PageStateSerializer.class).in(Singleton.class); bind(EventBus.class).to(LoggingEventBus.class).in(Singleton.class); bind(StateProvider.class).to(GxtStateProvider.class); bind(Frame.class).annotatedWith(Root.class).to(AppFrameSet.class); bind(GalleryView.class).to(GalleryPage.class); }
@Override protected void configure() { bind(IconRegistry.class).to(IconRegistryImpl.class).in(Singleton.class); bind(DefaultIconsRegistrar.class).asEagerSingleton(); bind(FontAwesomeInjector.class).asEagerSingleton(); bind(BrowserTabCloseHandler.class).asEagerSingleton(); .build(WorkBenchControllerFactory.class)); bind(WorkspaceView.class).to(WorkspaceViewImpl.class).in(Singleton.class); bind(MainMenuView.class).to(MainMenuViewImpl.class).in(Singleton.class); bind(ToolbarView.class).to(ToolbarViewImpl.class); bind(ToolbarPresenter.class) .annotatedWith(MainToolbar.class) .to(ToolbarPresenter.class) .in(Singleton.class); bind(MessageDialogView.class).to(MessageDialogViewImpl.class); bind(ConfirmDialogFooter.class); bind(ConfirmDialogView.class).to(ConfirmDialogViewImpl.class); bind(ChoiceDialogFooter.class); bind(ChoiceDialogView.class).to(ChoiceDialogViewImpl.class); bind(InputDialogFooter.class); bind(InputDialogView.class).to(InputDialogViewImpl.class); .build(ConsoleButtonFactory.class)); bind(StatusPanelGroupView.class).to(StatusPanelGroupViewImpl.class).in(Singleton.class);
@Override protected void configure() { bind(EventBus.class).annotatedWith(Names.named("emite")).to(LoggingEventBus.class).in(Singleton.class); bind(XmppConnection.class).to(XmppConnectionBosh.class); bind(XmppSession.class).to(XmppSessionImpl.class); }
protected void configure() { bind(EventBus.class).to(LoggingEventBus.class); bind(WorkspacePresenter.class).annotatedWith(Names.named("default")).to(DocumentMasterPresenter.class); }
@Override protected void configure() { bind(PairChatManager.class).to(PairChatManagerImpl.class).asEagerSingleton(); bind(PresenceManager.class).to(PresenceManagerImpl.class).asEagerSingleton(); bind(SubscriptionManager.class).to(SubscriptionManagerImpl.class).asEagerSingleton(); bind(XmppRoster.class).to(XmppRosterImpl.class).asEagerSingleton(); }
@Override protected void configure() { // Common apps install(new UtilsGinModule()); // modules install(new LoggerGinModule()); install(new AppenderGinModule()); // install(new OverviewGinModule()); bind(LogbackUiController.class).asEagerSingleton(); bind(INotificator.class).to(LogNotificator.class).asEagerSingleton(); } }
@Override protected void configure() { bind(LoggerController.class).asEagerSingleton(); final GinMultibinder<IAppModule> multibinder = GinMultibinder.newSetBinder(binder(), IAppModule.class); multibinder.addBinding().to(LoggerModule.class).asEagerSingleton(); }
@Override protected void configure() { bind(Synchronizer.class).to(SynchronizerImpl.class); bind(HandlerRegistry.class).toProvider(HandlerRegistryProvider.class); bind(SqlDialect.class).to(SqliteDialect.class); }
@Override protected void configure() { bind(CurrentWorkspaceManager.class).asEagerSingleton(); bind(WorkspaceStatusNotification.class).asEagerSingleton(); bind(StartWorkspaceNotification.class).asEagerSingleton(); bind(StartWsAgentNotification.class).asEagerSingleton(); } }
/** * Convenience method for binding a singleton presenter with its proxy, when * using automatically generated proxy classes and non-singleton views. * <p/> * <b>Important!</b> This is only be meant to be used by presenters associated * with non-singleton views, for example when the same view class is reused * with many presenters. As such, you will need to also use the * {@link #bindSharedView} method. If the view class is use only by one * presenter, you should consider using * {@link #bindPresenter(Class, Class, Class, Class)} instead. * * @param <P> The {@link Presenter} class type. * @param <Proxy_> The {@link Proxy} type. * @param presenterImpl The {@link Presenter} implementation (a singleton). * @param proxy The {@link Proxy} interface, which will lead to an * automatically generated proxy classes. */ protected <P extends Presenter<?, ?>, Proxy_ extends Proxy<P>> void bindPresenter( Class<P> presenterImpl, Class<Proxy_> proxy) { bind(presenterImpl).in(Singleton.class); bind(proxy).asEagerSingleton(); }
/** * Binds the {@link JsonRegistry}. * * @see com.google.gwt.inject.client.AbstractGinModule#configure() */ @Override protected void configure() { bind(JsonRegistry.class).in(Singleton.class); } }
protected <T> GinLinkedBindingBuilder<T> bindAnnotated(Class<T> clazz) { GinAnnotatedBindingBuilder<T> binding = bind(clazz); if (annotationClass != null) { return binding.annotatedWith(annotationClass); } return binding; } }