/** * @see GinBinder#bind(Class) */ protected final <T> GinAnnotatedBindingBuilder<T> bind(Class<T> clazz) { return binder.bind(clazz); }
public <T> GinLinkedBindingBuilder<T> bind(TypeLiteral<T> type) { return binder.bind(type).annotatedWith(Internal.class); }
/** * Makes a binding for {@code type} available to other modules and the injector. Use {@link * GinAnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} * with a binding annotation. */ protected final GinAnnotatedElementBuilder expose(TypeLiteral<?> type) { return binder.expose(type); }
@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 configureDispatch() { bind(RpcDispatchCallFactory.class).to(builder.getDispatchCallFactory()).in(Singleton.class); bind(DispatchAsync.class).to(builder.getDispatchAsync()).in(Singleton.class); bind(RpcInterceptorRegistry.class).to(builder.getInterceptorRegistry()).in(Singleton.class); bind(RpcDispatchHooks.class).to(builder.getDispatchHooks()).in(Singleton.class); bindAnnotated(ExceptionHandler.class).to(builder.getExceptionHandler()); }
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(); }
/** * Binds the components related with the federation configuration path */ private void bindFederation() { bindPresenter(FederationPresenter.class, FederationPresenter.MyView.class, NewFederationView.class, FederationPresenter.MyProxy.class); bind(FederationStore.class).to(FederationStoreImpl.class).in(Singleton.class); bind(DeploymentFederationStore.class).to(DeploymentFederationStoreImpl.class).in(Singleton.class); bind(DeploymentManager.class).in(Singleton.class); bind(FederationManager.class); } }
/** * Make BindingsRegistry available inside our PrivateModule via @Internal annotation as there is * no other way to inject a registry to our generic internal classes when the multibindings is * being configured with user defined annotations. */ protected final void bindInternalBindingsRegistry() { bind(bindingsRegistry()).annotatedWith(Internal.class).to(annotated(bindingsRegistry())); }
public <T> GinConstantBindingBuilder bindConstant() { return binder.bindConstant().annotatedWith(Internal.class); }
/** * @see GinBinder#install(Module) */ protected final void install(GinModule install) { binder.install(install); }
/** * @see GinBinder#bindConstant() */ protected final GinAnnotatedConstantBindingBuilder bindConstant() { return binder.bindConstant(); }
/** * @see GinBinder#requestStaticInjection(Class[]) */ protected void requestStaticInjection(Class<?>... types) { binder.requestStaticInjection(types); }
@Override protected void configure() { // TODO: Move jackson implementation to an extension registerSerializationBinding(binder()).to(JsonSerialization.class).in(Singleton.class); newSetBinder(binder(), JacksonMapperProvider.class); bind(JacksonMapperProvider.class).to(DispatchingJacksonMapperProvider.class).in(Singleton.class); } }
/** * @see GinBinder#bind(Key) */ protected final <T> GinLinkedBindingBuilder<T> bind(Key<T> key) { return binder.bind(key); }
/** * Makes a binding for {@code type} available to other modules and the injector. Use {@link * GinAnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} * with a binding annotation. */ protected final GinAnnotatedElementBuilder expose(Class<?> type) { return binder.expose(type); }
/** * @see GinBinder#bind(TypeLiteral) */ protected final <T> GinAnnotatedBindingBuilder<T> bind(TypeLiteral<T> type) { return binder.bind(type); }
/** * Makes the binding for {@code key} available to other modules and the injector. */ protected final <T> void expose(Key<T> key) { binder.expose(key); }