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

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


      Integer port = config.getPort();

      // TODO: can not set contextRoot in config, change to prefixContextRoot
      String contextRoot = null; //protocolConfiguration.getContextRoot();
     
      Servlet servlet = context.getServletByName(ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME);
      if(servlet != null)
      {
         // use the context where the Arquillian servlet is found
         if(address == null)
         {
            address = context.getHost();
         }
         if(port == null)
         {
            port = context.getPort();
         }
         contextRoot = servlet.getContextRoot();
      }
      else
      {
         throw new IllegalArgumentException(
              ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME + " not found. " +
View Full Code Here


         final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(),
               configuration.getBindHttpPort());

         for (String mapping : standardContext.findServletMappings())
         {
            httpContext.add(new Servlet(standardContext.findServletMapping(mapping), contextName.getPath()));
         }

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
View Full Code Here

         final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(),
               configuration.getBindHttpPort());

         for (String mapping : standardContext.findServletMappings())
         {
            httpContext.add(new Servlet(standardContext.findServletMapping(mapping), contextName.getPath()));
         }

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
View Full Code Here

      // For each servlet MBean of the given context add the servlet info to the HTTPContext.
      for (ObjectInstance oi : servletMBeans)
      {
         String servletName = oi.getObjectName().getKeyProperty("name");
         httpContext.add(new Servlet(servletName, context));
         if (log.isLoggable(Level.FINE))
         {
            log.fine("Added servlet " + oi.toString() + " to HttpContext for archive" + context);
         }
      }
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

    protected static ProtocolMetaData getProtocolMetaData(String host, int port, Archive<?> archive) {
        HTTPContext httpContext = new HTTPContext(host, port);
        List<String> servlets = extractServlets(archive);
        for (String name : servlets) {
            httpContext.add(new Servlet(name, "")); // GAE apps have root context
        }
        return new ProtocolMetaData().addContext(httpContext);
    }
View Full Code Here

            ObjectName[] servletRuntimes = findServletRuntimes(wlServerRuntime, deploymentName);
            for (ObjectName servletRuntime : servletRuntimes)
            {
               String servletName = (String) connection.getAttribute(servletRuntime, "ServletName");
               String servletContextRoot = (String) connection.getAttribute(servletRuntime, "ContextPath");
               httpContext.add(new Servlet(servletName, servletContextRoot));
            }
         }
      }
View Full Code Here

                    if (clazz == null) {
                        continue;
                    }
                }

                httpContext.add(new Servlet(clazz, webApps.contextRoot));
                /*
                for (String mapping : servlet.mappings) {
                    httpContext.add(new Servlet(servlet.servletClass, startWithSlash(uniqueSlash(webApps.contextRoot, mapping))));

                }
View Full Code Here

            if (object instanceof WebArchive) {
                arquillianServlet = "/" + getArchiveNameWithoutExtension(archive);
            } else {
                arquillianServlet = "/arquillian-protocol";
            }
            httpContext.add(new Servlet("ArquillianServletRunner", arquillianServlet));
            addServlets(httpContext, appInfo);

            return new ProtocolMetaData().addContext(httpContext);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        for (String servletName : ServletUtils.getServletNames(webDeployment)) {
            String contextRoot = getContextContextRootFromApplicationXml(enterpriseDeployment, deploymentName);
            if (contextRoot == null) {
                contextRoot = toContextRoot(deploymentName, webDeployment);
            }
            context.add(new Servlet(servletName, contextRoot));

            if (log.isLoggable(Level.FINE)) {
                log.fine("Context " + context.getHost() + " enriched with " + servletName + " at " + contextRoot);
            }
        }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.container.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.