Package org.springframework.context

Examples of org.springframework.context.ApplicationContext.publishEvent()


    @Override
    public void contextInitialized(ServletContextEvent event) {
        super.contextInitialized(event);
        ApplicationContext appContext = getContextLoader().getCurrentWebApplicationContext();
        if (appContext != null) {
            appContext.publishEvent(new ContextLoadedEvent(appContext));
        }
    }
}
View Full Code Here


                     *          {@link com.hazelcast.web.SessionListener} to
                     *          {@link org.springframework.security.core.session.SessionRegistry}
                     *      ),
                     * it will be just updated.
                     */
                    appContext.publishEvent(new HttpSessionCreatedEvent(session));

                    LOGGER.finest("Published create session event for Spring for session with id "
                            + session.getId());
                }
            }
View Full Code Here

                    /**
                     * Publish an event to notify
                     * {@link org.springframework.security.core.session.SessionRegistry} instance.
                     * So Spring clears information about our Hazelcast session.
                     */
                    appContext.publishEvent(new HttpSessionDestroyedEvent(session));

                    LOGGER.finest("Published destroy session event for Spring for session with id "
                            + session.getId());
                }
            }
View Full Code Here

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
      ApplicationContext context = event.getApplicationContext();
      if (context instanceof ConfigurableApplicationContext
          && context == event.getSource()) {
        context.publishEvent(new ParentContextAvailableEvent(
            (ConfigurableApplicationContext) context));
      }
    }

  }
View Full Code Here

    @Override
    public void contextInitialized(ServletContextEvent event) {
        super.contextInitialized(event);
        ApplicationContext appContext = getContextLoader().getCurrentWebApplicationContext();
        if (appContext != null) {
            appContext.publishEvent(new ContextLoadedEvent(appContext));
        }
    }
}
View Full Code Here

            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                final boolean switchTo = !Boolean.parseBoolean(toggleInfo.getModel().getObject());
                final ApplicationContext ctx = getGeoServerApplication().getApplicationContext();
                ctx.publishEvent(new ToggleEvent(switchTo, type));
                // getConfig().putConfiguration(configKey,
                // Boolean.toString(switchTo));
                if (switchTo) {
                    fp.info("The " + type + " toggle is now ENABLED");
                } else {
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.