Package org.springframework.context.event

Examples of org.springframework.context.event.SimpleApplicationEventMulticaster


      if (logger.isDebugEnabled()) {
        logger.debug("Using ApplicationEventMulticaster [" + this.applicationEventMulticaster + "]");
      }
    }
    else {
      this.applicationEventMulticaster = new SimpleApplicationEventMulticaster(beanFactory);
      beanFactory.registerSingleton(APPLICATION_EVENT_MULTICASTER_BEAN_NAME, this.applicationEventMulticaster);
      if (logger.isDebugEnabled()) {
        logger.debug("Unable to locate ApplicationEventMulticaster with name '" +
            APPLICATION_EVENT_MULTICASTER_BEAN_NAME +
            "': using default [" + this.applicationEventMulticaster + "]");
View Full Code Here


      if (logger.isDebugEnabled()) {
        logger.debug("Using ApplicationEventMulticaster [" + this.applicationEventMulticaster + "]");
      }
    }
    else {
      this.applicationEventMulticaster = new SimpleApplicationEventMulticaster();
      beanFactory.registerSingleton(APPLICATION_EVENT_MULTICASTER_BEAN_NAME, this.applicationEventMulticaster);
      if (logger.isDebugEnabled()) {
        logger.debug("Unable to locate ApplicationEventMulticaster with name '" +
            APPLICATION_EVENT_MULTICASTER_BEAN_NAME +
            "': using default [" + this.applicationEventMulticaster + "]");
View Full Code Here

  private String[] args;

  public EventPublishingRunListener(SpringApplication application, String[] args) {
    this.application = application;
    this.args = args;
    this.multicaster = new SimpleApplicationEventMulticaster();
    for (ApplicationListener<?> listener : application.getListeners()) {
      this.multicaster.addApplicationListener(listener);
    }
  }
View Full Code Here

      List<ApplicationListener<ApplicationEvent>> delegates = getListeners(((ApplicationEnvironmentPreparedEvent) event)
          .getEnvironment());
      if (delegates.isEmpty()) {
        return;
      }
      this.multicaster = new SimpleApplicationEventMulticaster();
      for (ApplicationListener<ApplicationEvent> listener : delegates) {
        this.multicaster.addApplicationListener(listener);
      }
    }
    if (this.multicaster != null) {
View Full Code Here

  @Configuration
  static class Multicaster {

    @Bean
    public SimpleApplicationEventMulticaster applicationEventMulticaster() {
      return new SimpleApplicationEventMulticaster();
    }
View Full Code Here

@ComponentScan("org.baeldung.springevents.synchronous")
public class AsynchronousSpringEventsConfig {

    @Bean(name = "applicationEventMulticaster")
    public ApplicationEventMulticaster simpleApplicationEventMulticaster() {
        final SimpleApplicationEventMulticaster simpleApplicationEventMulticaster = new SimpleApplicationEventMulticaster();
        simpleApplicationEventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());
        return simpleApplicationEventMulticaster;
    }
View Full Code Here

    return taskExecutor;
  }

  private OsgiBundleApplicationContextEventMulticaster createDefaultEventMulticaster() {
    isMulticasterManagedInternally = true;
    return new OsgiBundleApplicationContextEventMulticasterAdapter(new SimpleApplicationEventMulticaster());
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.event.SimpleApplicationEventMulticaster

Copyright © 2018 www.massapicom. 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.