Examples of publishEvent()


Examples of org.springframework.context.support.ClassPathXmlApplicationContext.publishEvent()

  public static void main(String[] args) {
    DOMConfigurator.configure(ServerMain.class.getClassLoader().getResource("logging/log4j.xml"));

    ApplicationContext appCtx = new ClassPathXmlApplicationContext("classpath*:spring/spring-*.xml");
    appCtx.publishEvent(new ContextStartedEvent(appCtx));
  }

  @Override
  public void onApplicationEvent(ContextStartedEvent event) {
    // JMonkey-Messages f�r Netzwerkkommunikation registrieren
View Full Code Here

Examples of org.springframework.context.support.StaticApplicationContext.publishEvent()

    listenerDef.getConstructorArgumentValues().addGenericArgumentValue(new RuntimeBeanReference("broadcaster"));
    context.registerBeanDefinition("listener", listenerDef);
    context.refresh();

    BeanThatBroadcasts broadcaster = (BeanThatBroadcasts) context.getBean("broadcaster");
    context.publishEvent(new MyEvent(context));
    assertEquals("The event was not received by the listener", 2, broadcaster.receivedCount);
  }


  public static class MyEvent extends ApplicationEvent {
View Full Code Here

Examples of org.springframework.data.hadoop.store.event.StoreEventPublisher.publishEvent()

      renameFile(streamsHolder.getPath());

      StoreEventPublisher storeEventPublisher = getStoreEventPublisher();
      if (storeEventPublisher != null) {
        storeEventPublisher.publishEvent(new FileWrittenEvent(this, streamsHolder.getPath()));
      }

      streamsHolder = null;
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.store.event.StoreEventPublisher.publishEvent()

      renameFile(streamsHolder.getPath());

      StoreEventPublisher storeEventPublisher = getStoreEventPublisher();
      if (storeEventPublisher != null) {
        storeEventPublisher.publishEvent(new FileWrittenEvent(this, streamsHolder.getPath()));
      }

      streamsHolder = null;
    }
  }
View Full Code Here

Examples of org.springframework.data.hadoop.store.event.StoreEventPublisher.publishEvent()

      renameFile(holder.getPath());

      StoreEventPublisher storeEventPublisher = getStoreEventPublisher();
      if (storeEventPublisher != null) {
        storeEventPublisher.publishEvent(new FileWrittenEvent(this, holder.getPath()));
      }

      holder = null;
    }
  }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext.publishEvent()

    public void sessionCreated(HttpSessionEvent se) {
        final HttpSession session = se.getSession();
        final HttpSessionCreatedEvent httpSessionCreatedEvent = new HttpSessionCreatedEvent(session);
       
        final WebApplicationContext webApplicationContext = this.getWebApplicationContext(session);
        webApplicationContext.publishEvent(httpSessionCreatedEvent);
    }

    /* (non-Javadoc)
     * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent)
     */
 
View Full Code Here

Examples of org.springframework.yarn.event.YarnEventPublisher.publishEvent()

  @Override
  public void onApplicationEvent(ApplicationEvent event) {
    if (event instanceof JobExecutionEvent) {
      YarnEventPublisher eventPublisher = getYarnEventPublisher();
      if (eventPublisher != null) {
        eventPublisher.publishEvent(new org.springframework.yarn.batch.event.JobExecutionEvent(this,
            ((JobExecutionEvent) event).getJobExecution()));
      }
    }
  }
View Full Code Here

Examples of org.trpr.platform.core.spi.event.PlatformEventProducer.publishEvent()

     * common proxy handler context (i.e. ServiceProxyFrameworkConstants.COMMON_PROXY_CONFIG).
     * Note that typically no consumers are registered when running this container
     */
    public void publishEvent(PlatformEvent event) {
        PlatformEventProducer publisher = (PlatformEventProducer) ServiceProxyComponentContainer.commonProxyHandlerBeansContext.getBean(DEFAULT_EVENT_PRODUCER);
        publisher.publishEvent(event);
    }

    /**
     * Interface method implementation. Publishes the specified event using the {@link #publishEvent(PlatformEvent)} method
     * @see ComponentContainer#publishBootstrapEvent(PlatformEvent)
View Full Code Here

Examples of org.wso2.carbon.eventing.broker.services.EventBrokerService.publishEvent()

        ((CarbonEventBroker)broker).registerNotificationManager(notificationManager);

        assertNotNull("Notification Manager is not set", broker.getNotificationManager());
        assertSame("Invalid notification manager", notificationManager,
                broker.getNotificationManager());
        broker.publishEvent(new Event());

        assertTrue("Invalid event published status",
                ((TestNotificationManager)notificationManager).isEventPublished());
    }
View Full Code Here

Examples of org.wso2.event.EventBrokerService.publishEvent()

      }
    };
   
    brokerInstance.subscribeNonPersistantly(subscription, dispatcher);
   
    brokerInstance.publishEvent(new Event(new Object(), topic));
   
    Thread.sleep(10000);
  }

}
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.