Examples of addWebAppListener()


Examples of org.gatein.wci.ServletContainer.addWebAppListener()

     //
     final SynchronizedBoolean called = new SynchronizedBoolean(false);
     container.register(scc);
     container.addWebAppListener(registry);
     container.addWebAppListener(new WebAppListener()
     {
       public void onEvent(WebAppEvent event)
       {
         called.set(true);
         throw new Error("Expected Error: don't freak out");
View Full Code Here

Examples of org.gatein.wci.ServletContainer.addWebAppListener()

   @Override
   protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
   {
      ServletContainer container = ServletContainerFactory.getServletContainer();
      WebAppRegistry registry = new WebAppRegistry();
      if (container.addWebAppListener(registry))
      {
         try
         {
            WebApp app = registry.getWebApp("/rdapp");
            if (app != null)
View Full Code Here

Examples of org.gatein.wci.ServletContainer.addWebAppListener()

                startConsumers();

                // listen for web app events so that we can inject services into WSRP admin UI "cleanly"
                // todo: this service injection should really be done using CDI... :/
                ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
                servletContainer.addWebAppListener(this);

                log.info("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' STARTED");
            } catch (Exception e) {
                log.error("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' FAILED to start", e);
            }
View Full Code Here

Examples of org.gatein.wci.ServletContainer.addWebAppListener()

                startConsumers();

                // listen for web app events so that we can inject services into WSRP admin UI "cleanly"
                // todo: this service injection should really be done using CDI... :/
                ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
                servletContainer.addWebAppListener(this);

                log.info("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' STARTED");
            } catch (Exception e) {
                log.error("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' FAILED to start", e);
            }
View Full Code Here

Examples of org.gatein.wci.ServletContainer.addWebAppListener()

      ServletContainer _container = ServletContainerFactory.getServletContainer();
      Assert.assertNotNull(_container);

      //
      WebAppRegistry _registry = new WebAppRegistry();
      _container.addWebAppListener(_registry);
      HashSet<String> _keys = new HashSet<String>(_registry.getKeys());

      //
      registry = _registry;
      keys = _keys;
View Full Code Here

Examples of org.gatein.wci.impl.DefaultServletContainer.addWebAppListener()

      //
      container.register(scc);

      //
      container.addWebAppListener(registry);

      //
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      scc.registration.registerWebApp(new WebAppContextImpl("/bar"));
      assertEquals(Tools.toSet("/foo", "/bar"), registry.getKeys());
View Full Code Here

Examples of org.gatein.wci.impl.DefaultServletContainer.addWebAppListener()

      ServletContainer container = new DefaultServletContainer();
      ServletContainerContextImpl scc = new ServletContainerContextImpl();
      WebAppRegistry registry = new WebAppRegistry();

      //
      container.addWebAppListener(registry);
      container.addWebAppListener(registry);

      //
      container.register(scc);
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
View Full Code Here

Examples of org.gatein.wci.impl.DefaultServletContainer.addWebAppListener()

      ServletContainerContextImpl scc = new ServletContainerContextImpl();
      WebAppRegistry registry = new WebAppRegistry();

      //
      container.addWebAppListener(registry);
      container.addWebAppListener(registry);

      //
      container.register(scc);
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      assertEquals(Tools.toSet("/foo"), registry.getKeys());
View Full Code Here

Examples of org.gatein.wci.impl.DefaultServletContainer.addWebAppListener()

      container.register(scc);
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      assertEquals(Tools.toSet("/foo"), registry.getKeys());

      //
      container.addWebAppListener(registry);
      assertEquals(Tools.toSet("/foo"), registry.getKeys());

      //
      container.removeWebAppListener(registry);
      assertEquals(Tools.toSet(), registry.getKeys());
View Full Code Here

Examples of org.gatein.wci.impl.DefaultServletContainer.addWebAppListener()

      // Add 2 web apps
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      scc.registration.registerWebApp(new WebAppContextImpl("/bar"));

      // Add listener
      container.addWebAppListener(registry);

      // Assert we received events during the registration
      assertEquals(Tools.toSet("/foo", "/bar"), registry.getKeys());

      // Add a new web app
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.