Ejemplo n.º 1
0
  @Override
  protected void configure() {
    try {

      Configuration conf = new ConfigurationImpl();
      String baseUrl = conf.getBaseUrl();

      MyHessianProxyFactory factory = new MyHessianProxyFactory();
      bind(Configuration.class).toInstance(conf);
      bind(Context.class).toInstance(context);
      bind(ServiceProxyFactory.class).toInstance(factory);
      bindService(baseUrl, SigninService.class, factory);
      bindService(baseUrl, PropertyController.class, factory);
      bindService(baseUrl, ResourceController.class, factory);
      bindService(baseUrl, GeoController.class, factory);
      bindService(baseUrl, InboxController.class, factory);

    } catch (Exception e) {
      UncheckedThrow.throwUnchecked(e);
    }
  }