Package com.google.common.eventbus

Examples of com.google.common.eventbus.EventBus.register()


          PollingZooKeeperConfigurationProvider zookeeperConfigurationProvider =
            new PollingZooKeeperConfigurationProvider(
              agentName, zkConnectionStr, baseZkPath, eventBus);
          components.add(zookeeperConfigurationProvider);
          application = new Application(components);
          eventBus.register(application);
        } else {
          StaticZooKeeperConfigurationProvider zookeeperConfigurationProvider =
            new StaticZooKeeperConfigurationProvider(
              agentName, zkConnectionStr, baseZkPath);
          application = new Application();
View Full Code Here


          PollingPropertiesFileConfigurationProvider configurationProvider =
            new PollingPropertiesFileConfigurationProvider(
              agentName, configurationFile, eventBus, 30);
          components.add(configurationProvider);
          application = new Application(components);
          eventBus.register(application);
        } else {
          PropertiesFileConfigurationProvider configurationProvider =
            new PropertiesFileConfigurationProvider(
              agentName, configurationFile);
          application = new Application();
View Full Code Here

      replay(mockFuture);
      replay(schedulerMock);

      CoutingEventHandler handler = new CoutingEventHandler();
      EventBus eventBus = new EventBus();
      eventBus.register(handler);

      AsyncMonitor<Object> monitor = mockMonitor(schedulerMock, new Object(), mockFunction(MonitorStatus.DONE),
            eventBus);

      assertNull(monitor.getFuture());
View Full Code Here

      replay(mockFuture);
      replay(schedulerMock);

      CoutingEventHandler handler = new CoutingEventHandler();
      EventBus eventBus = new EventBus();
      eventBus.register(handler);

      AsyncMonitor<Object> monitor = mockMonitor(schedulerMock, new Object(), mockFunction(MonitorStatus.FAILED),
            eventBus);

      assertNull(monitor.getFuture());
View Full Code Here

      replay(mockFuture);
      replay(schedulerMock);

      CoutingEventHandler handler = new CoutingEventHandler();
      EventBus eventBus = new EventBus();
      eventBus.register(handler);

      AsyncMonitor<Object> monitor = mockMonitor(schedulerMock, new Object(), mockFunction(MonitorStatus.CONTINUE),
            eventBus);

      assertNull(monitor.getFuture());
View Full Code Here

      replay(mockFuture);
      replay(schedulerMock);

      CoutingEventHandler handler = new CoutingEventHandler();
      EventBus eventBus = new EventBus();
      eventBus.register(handler);

      AsyncMonitor<Object> monitor = mockMonitor(schedulerMock, new Object(), mockFunction(MonitorStatus.CONTINUE),
            eventBus);

      assertNull(monitor.getFuture());
View Full Code Here

  }

  @Override
  protected void configure() {
    final EventBus eventBus = new EventBus("TaskEvents");
    eventBus.register(new Object() {
      @Subscribe public void logDeadEvent(DeadEvent event) {
        LOG.warning("Captured dead event " + event.getEvent());
      }
    });
View Full Code Here

    */
   @Provides
   @Singleton
   EventBus provideSyncEventBus(DeadEventLoggingHandler deadEventsHandler) { // NO_UCD
      EventBus syncBus = new EventBus("jclouds-sync-event-bus");
      syncBus.register(deadEventsHandler);
      return syncBus;
   }

   /**
    * Configures the {@link EventBus} to be singleton and enables the {@link AsyncBus} annotation.
View Full Code Here

    @Override
    protected void setUp() throws Exception {
      subscriber = createSubscriber();
      EventBus bus = new EventBus();
      bus.register(subscriber);
      bus.post(EVENT);
    }

    @Override
    protected void tearDown() throws Exception {
View Full Code Here

    long start = System.currentTimeMillis();   
    final List<String> testClassNames = processTestResources();

    final EventBus aggregatedBus = new EventBus("aggregated");
    final TestsSummaryEventListener summaryListener = new TestsSummaryEventListener();
    aggregatedBus.register(summaryListener);
   
    for (Object o : listeners) {
      if (o instanceof ProjectComponent) {
        ((ProjectComponent) o).setProject(getProject());
      }
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.