Package org.jboss.arquillian.spi.client.protocol.metadata

Examples of org.jboss.arquillian.spi.client.protocol.metadata.Servlet


        NodeList servlets = (NodeList) xpath.evaluate("/map/entry[@key = 'properties']/map/entry[@value = 'Servlet']",
                new InputSource(new StringReader(xmlResponse)), XPathConstants.NODESET);

        for (int i = 0; i < servlets.getLength(); i++) {
            httpContext.add(new Servlet(servlets.item(i).getAttributes().getNamedItem("key").getNodeValue(), this.deploymentName));
        }

        protocolMetaData.addContext(httpContext);
        return protocolMetaData;
    }
View Full Code Here


         {
            ManagedComponent comp = warComponentEntry.getValue();
            if(comp.getType().getSubtype().equals("Servlet"))
            {
               String servletName = comp.getNameType().replaceFirst(".*,name=(.*)", "$1");
               context.add(new Servlet(servletName, contextRoot));
            }
         }
      }
   }
View Full Code Here

         webAppContextProducer.set(wctx);
        
         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
            httpContext.add(new Servlet(servlet.getName(), servlet.getContextPath()));
         }
        
         return new ProtocolMetaData()
            .addContext(httpContext);
View Full Code Here

         String contextPath = standardContext.getPath();
         HTTPContext httpContext = new HTTPContext(bindAddress, bindPort);
        
         for(String mapping : standardContext.findServletMappings())
         {
            httpContext.add(new Servlet(
                  standardContext.findServletMapping(mapping), contextPath));
         }
        
         return new ProtocolMetaData()
            .addContext(httpContext);
View Full Code Here

         {
            ManagedComponent comp = warComponentEntry.getValue();
            if (comp.getType().getSubtype().equals("Servlet"))
            {
               String servletName = comp.getNameType().replaceFirst(".*,name=(.*)", "$1");
               context.add(new Servlet(servletName, contextRoot));
            }
         }
      }
   }
View Full Code Here

         webAppContextProducer.set(wctx);
        
         HTTPContext httpContext = new HTTPContext(containerConfig.getBindAddress(), containerConfig.getBindHttpPort());
         for(ServletHolder servlet : wctx.getServletHandler().getServlets())
         {
            httpContext.add(new Servlet(servlet.getName(), servlet.getContextPath()));
         }
        
         return new ProtocolMetaData()
            .addContext(httpContext);
View Full Code Here

   @Test
   public void shouldBeAbleToInjectServlet() throws Exception
   {
      bind(ApplicationScoped.class, ProtocolMetaData.class,
            new ProtocolMetaData().addContext(new HTTPContext("TEST", 8080)
            .add(new Servlet(URLServletContextClass.class.getSimpleName(), "/test"))));
     
      TestEnricher enricher = new ArquillianResourceTestEnricher();
      injector.get().inject(enricher);

      URLServletContextClass test = new URLServletContextClass();
View Full Code Here

      ServletMethodExecutor executor = protocol.getExecutor(
            config,
            new ProtocolMetaData()
               .addContext(
                     new HTTPContext("127.0.0.1", 8080)
                        .add(new Servlet(ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME, "test"))));
     
      Assert.assertEquals("http://127.0.0.1:8080/test", executor.getBaseURI().toString());
   }
View Full Code Here

      ServletMethodExecutor executor = protocol.getExecutor(
            config,
            new ProtocolMetaData()
               .addContext(
                     new HTTPContext("127.0.0.1", 8080)
                        .add(new Servlet(ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME, "test"))));
     
      Assert.assertEquals("http://10.10.10.1:90/test", executor.getBaseURI().toString());
   }
View Full Code Here

         Set<ObjectName> servletObjects = connection.queryNames(new ObjectName(
               "*:*,J2EEApplication=none,J2EEServer=none,j2eeType=Servlet,name=" + servletName), null);
         for (ObjectName servletObject : servletObjects)
         {
            String contextRoot = servletObject.getKeyProperty("WebModule").replaceAll(".*\\/(.*)", "$1");
            httpContext.add(new Servlet(servletName, contextRoot));
         }
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.spi.client.protocol.metadata.Servlet

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.