Package org.springframework.context.event

Examples of org.springframework.context.event.SourceFilteringListener


    wac.setParent(parent);
    wac.setServletContext(getServletContext());
    wac.setServletConfig(getServletConfig());
    wac.setNamespace(getNamespace());
    wac.setConfigLocation(getContextConfigLocation());
    wac.addApplicationListener(new SourceFilteringListener(wac, this));

    postProcessWebApplicationContext(wac);
    wac.refresh();

    return wac;
View Full Code Here


    }

    wac.setServletContext(getServletContext());
    wac.setServletConfig(getServletConfig());
    wac.setNamespace(getNamespace());
    wac.addApplicationListener(new SourceFilteringListener(wac, new ContextRefreshListener()));

    // the wac environment's #initPropertySources will be called in any case when
    // the context is refreshed; do it eagerly here to ensure servlet property sources
    // are in place for use in any post-processing or initialization that occurs
    // below prior to #refresh
View Full Code Here

    }

    wac.setServletContext(getServletContext());
    wac.setServletConfig(getServletConfig());
    wac.setNamespace(getNamespace());
    wac.addApplicationListener(new SourceFilteringListener(wac, new ContextRefreshListener()));

    postProcessWebApplicationContext(wac);

    applyInitializers(wac);
View Full Code Here

    pac.setParent(parent);
    pac.setPortletContext(getPortletContext());
    pac.setPortletConfig(getPortletConfig());
    pac.setNamespace(getNamespace());
    pac.setConfigLocation(getContextConfigLocation());
    pac.addApplicationListener(new SourceFilteringListener(pac, this));

    postProcessPortletApplicationContext(pac);
    pac.refresh();

    return pac;
View Full Code Here

    pac.setNamespace(getNamespace());
    if (getContextConfigLocation() != null) {
      pac.setConfigLocations(StringUtils.tokenizeToStringArray(getContextConfigLocation(),
          ConfigurablePortletApplicationContext.CONFIG_LOCATION_DELIMITERS));
    }
    pac.addApplicationListener(new SourceFilteringListener(pac, this));

    postProcessPortletApplicationContext(pac);
    pac.refresh();

    return pac;
View Full Code Here

    if (getContextConfigLocation() != null) {
      wac.setConfigLocations(
          StringUtils.tokenizeToStringArray(
              getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS));
    }
    wac.addApplicationListener(new SourceFilteringListener(wac, this));

    postProcessWebApplicationContext(wac);
    wac.refresh();

    return wac;
View Full Code Here

    pac.setParent(parent);
    pac.setPortletContext(getPortletContext());
    pac.setPortletConfig(getPortletConfig());
    pac.setNamespace(getNamespace());
    pac.setConfigLocation(getContextConfigLocation());
    pac.addApplicationListener(new SourceFilteringListener(pac, this));

    postProcessPortletApplicationContext(pac);
    pac.refresh();

    return pac;
View Full Code Here

    public void testSourceFilteredListener() {
        StaticApplicationContext ctx = new StaticApplicationContext();
        MyApplicationListener delegate = new MyApplicationListener();
        MyEventSource source = new MyEventSource();
        MyEvent event = new MyEvent(source);
        ctx.addApplicationListener(new SourceFilteringListener(source, delegate));
        ctx.refresh();
        ctx.publishEvent(event);

        assertSame("Mismatched delegate event", event, delegate.getLastEvent());
View Full Code Here

    pac.setParent(parent);
    pac.setPortletContext(getPortletContext());
    pac.setPortletConfig(getPortletConfig());
    pac.setNamespace(getNamespace());
    pac.setConfigLocation(getContextConfigLocation());
    pac.addApplicationListener(new SourceFilteringListener(pac, this));

    // The wac environment's #initPropertySources will be called in any case when the context
    // is refreshed; do it eagerly here to ensure portlet property sources are in place for
    // use in any post-processing or initialization that occurs below prior to #refresh
    ConfigurableEnvironment env = pac.getEnvironment();
View Full Code Here

    }

    wac.setServletContext(getServletContext());
    wac.setServletConfig(getServletConfig());
    wac.setNamespace(getNamespace());
    wac.addApplicationListener(new SourceFilteringListener(wac, new ContextRefreshListener()));

    // The wac environment's #initPropertySources will be called in any case when the context
    // is refreshed; do it eagerly here to ensure servlet property sources are in place for
    // use in any post-processing or initialization that occurs below prior to #refresh
    ConfigurableEnvironment env = wac.getEnvironment();
View Full Code Here

TOP

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

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.