Package org.springframework.context.event

Examples of org.springframework.context.event.ContextRefreshedEvent


    }
   
    public void onApplicationEvent(ApplicationEvent applicationEvent)
    {
        if (applicationEvent instanceof ContextRefreshedEvent) {
            ContextRefreshedEvent initEvent = (ContextRefreshedEvent) applicationEvent;
            ApplicationContext context = initEvent.getApplicationContext();
            if (context != null) {
                configureMappings(context.getBeansOfType(Controller.class));
                configureInterceptors(context.getBeansOfType(HandlerInterceptor.class));
                configureRequestHandlers(context);
                configureValidators(context);
View Full Code Here


    }
   
    public void onApplicationEvent(ApplicationEvent applicationEvent)
    {
        if (applicationEvent instanceof ContextRefreshedEvent) {
            ContextRefreshedEvent initEvent = (ContextRefreshedEvent) applicationEvent;
            ApplicationContext context = initEvent.getApplicationContext();
            if (context != null) {
                configureMappings(context.getBeansOfType(Controller.class));
                configureInterceptors(context.getBeansOfType(HandlerInterceptor.class));
                configureRequestHandlers(context);
                configureValidators(context);
View Full Code Here

      {
         public void onApplicationEvent(ApplicationEvent event)
         {
            if (event instanceof ContextRefreshedEvent)
            {
               ContextRefreshedEvent cre = (ContextRefreshedEvent) event;
               ConfigurableListableBeanFactory autowireCapableBeanFactory = (ConfigurableListableBeanFactory) cre
                     .getApplicationContext().getAutowireCapableBeanFactory();
               new SpringBeanProcessor(dispatcher, registry, providerFactory)
                     .postProcessBeanFactory(autowireCapableBeanFactory);
            }
         }
View Full Code Here

    // Propagate refresh to lifecycle processor first.
    getLifecycleProcessor().onRefresh();

    // Publish the final event.
    publishEvent(new ContextRefreshedEvent(this));
  }
View Full Code Here

    // Propagate refresh to lifecycle processor first.
    getLifecycleProcessor().onRefresh();

    // Publish the final event.
    publishEvent(new ContextRefreshedEvent(this));

    // Participate in LiveBeansView MBean, if active.
    LiveBeansView.registerApplicationContext(this);
  }
View Full Code Here

  /**
   * Finish the refresh of this context, publishing the
   * {@link org.springframework.context.event.ContextRefreshedEvent}.
   */
  protected void finishRefresh() {
    publishEvent(new ContextRefreshedEvent(this));
  }
View Full Code Here

  /**
   * Finish the refresh of this context, publishing the
   * {@link org.springframework.context.event.ContextRefreshedEvent}.
   */
  protected void finishRefresh() {
    publishEvent(new ContextRefreshedEvent(this));
  }
View Full Code Here

  /**
   * Finish the refresh of this context, publishing the
   * {@link org.springframework.context.event.ContextRefreshedEvent}.
   */
  protected void finishRefresh() {
    publishEvent(new ContextRefreshedEvent(this));
  }
View Full Code Here

    // ...done ;-)
  }

  public void testOnApplicationEvent()  throws FileNotFoundException {
    PerformanceMonitorListener listener = new PerformanceMonitorListener();
    listener.onApplicationEvent(new ContextRefreshedEvent(new StaticApplicationContext()));
    assertEquals(0, listener.responseTimeMonitor.getAccessCount());
   
    RequestHandledEvent evt = new ServletRequestHandledEvent(new Object(),
      "http://www.springframework.org", "192.168.1.122", "GET", "servlet", "", "", 200);
    listener.onApplicationEvent(evt);
View Full Code Here

  /**
   * Finish the refresh of this context, publishing the
   * {@link org.springframework.context.event.ContextRefreshedEvent}.
   */
  protected void finishRefresh() {
    publishEvent(new ContextRefreshedEvent(this));
  }
View Full Code Here

TOP

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

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.