Examples of BaseModule


Examples of com.google.diffable.config.BaseModule

    timer.cancel();
  }
 
  public void contextInitialized(ServletContextEvent ctxEvent) {
    ServletContext ctx = ctxEvent.getServletContext();
      baseModule = new BaseModule();
     
    // Initialize Guice provided properties.
    inj = initializeInjectedProperties(ctx, baseModule);
   
    // Save the injector for later use by Diffable.
View Full Code Here

Examples of com.google.diffable.config.BaseModule

  @Test
  public void testDontPrintTraces() {
    StackTracePrinter printer =
      Guice.createInjector(
        new BaseModule()).getInstance(StackTracePrinter.class);
    ResourceManagerException exc = new ResourceManagerException("");
    printer.print(exc);
  }
View Full Code Here

Examples of com.google.diffable.config.BaseModule

  }
 
  @Test
  public void testInitializeInjectedNoConfigProperties()
  throws Throwable {
    BaseModule mod = new BaseModule();
    expect(
      ctx.getInitParameter("DiffableConfigProperties")).andReturn(null);
    expect(
      ctx.getRealPath("")).andReturn("");
    replay(ctx);
View Full Code Here

Examples of org.apache.s4.core.BaseModule

    public final static String CLUSTER_NAME = "cluster1";

    @Test
    public void test() throws Exception {
        Injector injector = Guice
                .createInjector(new BaseModule(Resources.getResource("default.s4.base.properties").openStream(),
                        "cluster1"), new DefaultCommModule(Resources.getResource("default.s4.comm.properties")
                        .openStream()), new DefaultCoreModule(Resources.getResource("default.s4.core.properties")
                        .openStream()));
        MyApp myApp = injector.getInstance(MyApp.class);
View Full Code Here

Examples of org.apache.s4.core.BaseModule

    }

    public static Injector createInjectorWithNonFailFastZKClients() throws IOException {
        return Guice.createInjector(Modules.override(
                new BaseModule(Resources.getResource("default.s4.base.properties").openStream(), "cluster1"),
                new DefaultCommModule(Resources.getResource("default.s4.comm.properties").openStream()),
                new DefaultCoreModule(Resources.getResource("default.s4.core.properties").openStream())).with(
                new NonFailFastZookeeperClientsModule()));
    }
View Full Code Here

Examples of org.apache.s4.core.BaseModule

                    10, "cluster1");
        } else {
            S4Node.main(new String[] { "-c", "cluster1" });
        }

        Injector injector = Guice.createInjector(new BaseModule(Resources.getResource("default.s4.base.properties")
                .openStream(), "cluster1"), new DefaultCommModule(Resources.getResource("default.s4.comm.properties")
                .openStream()));

        Emitter emitter = injector.getInstance(TCPEmitter.class);
        List<Long> messages = Lists.newArrayList();
View Full Code Here

Examples of org.apache.s4.core.BaseModule

    public static int TOTAL_WORDS = SENTENCE_1_TOTAL_WORDS + SENTENCE_2_TOTAL_WORDS + SENTENCE_3_TOTAL_WORDS;
    private TCPEmitter emitter;
    Injector injector;

    public void createEmitter() throws IOException {
        injector = Guice.createInjector(new BaseModule(
                Resources.getResource("default.s4.base.properties").openStream(), "cluster1"), new DefaultCommModule(
                Resources.getResource("default.s4.comm.properties").openStream()), new DefaultCoreModule(Resources
                .getResource("default.s4.core.properties").openStream()));

        emitter = injector.getInstance(TCPEmitter.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.