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

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


      {
         throw new DeploymentException("Could not create the application", ne);
      }

      // Invoke locally
      return new ProtocolMetaData();
   }
View Full Code Here


    @Override
    public ProtocolMetaData deploy(Archive<?> archive) throws DeploymentException {
        String uniqueName = deployer.deploy(archive, serverGroup.getName());

        ProtocolMetaData metaData = new ProtocolMetaData();
        for (Server server : domain.getServersInGroup(serverGroup)) {
            metaData.addContext(new LazyHttpContext(server, uniqueName, client));
        }
        return metaData;
    }
View Full Code Here

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

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Failed to deploy " + archive.getName(), e);
      }
View Full Code Here

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

         return new ProtocolMetaData().addContext(httpContext);
      }
      catch (Exception e)
      {
         throw new DeploymentException("Failed to deploy " + archive.getName(), e);
      }
View Full Code Here

    * @return
    * @throws DeploymentException
    */
   public ProtocolMetaData retrieveContextServletInfo(String context) throws DeploymentException
   {
      ProtocolMetaData protocolMetaData = new ProtocolMetaData();
      HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(), configuration.getBindHttpPort());

      JMXConnector jmxc = null;
      try
      {
         jmxc = connect(configuration.getJmxUri());
      }
      catch (IOException ex)
      {
         throw new DeploymentException(
                      "Unable to contruct metadata for archive deployment.\n" +
                            "Can't connect to '" + configuration.getJmxUri() + "'."
                            + "\n   Make sure JMX remote acces is enabled Tomcat's JVM - e.g. in startup.sh using $JAVA_OPTS."
                            + "\n   Example (with no authentication):" + "\n     -Dcom.sun.management.jmxremote.port="
                            + configuration.getJmxPort() + "\n     -Dcom.sun.management.jmxremote.ssl=false"
                            + "\n     -Dcom.sun.management.jmxremote.authenticate=false", ex);
      }

      Set<ObjectInstance> servletMBeans;
      try
      {
         servletMBeans = getServletMBeans(jmxc, context);
      }
      catch (IOException e)
      {
         throw new DeploymentException("Unable to construct metadata for archive deployment", e);
      }

      // 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);
         }
      }

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

            throw rte;
        } catch (Exception ex) {
            throw new DeploymentException("Cannot deploy: " + archive, ex);
        }

        return new ProtocolMetaData().addContext(new JMXContext(mbeanServer));
    }
View Full Code Here

            throw rte;
        } catch (Exception ex) {
            throw new DeploymentException("Cannot deploy: " + archive, ex);
        }

        return new ProtocolMetaData().addContext(new JMXContext(mbeanServer));
    }
View Full Code Here

public final class ManagementViewParser
{
   public static ProtocolMetaData parse(String archiveName, ProfileService profile)
      throws Exception
   {
      ProtocolMetaData metaData = new ProtocolMetaData();
     
      ManagementView management = profile.getViewManager();
      management.load();

      // extract server info
      HTTPContext httpContext = extractHTTPContext(management);
      if(httpContext != null)
      {
         metaData.addContext(httpContext);
      }
     
      // extract deployment content
      scanDeployment(management, httpContext, management.getDeployment(archiveName));
View Full Code Here

        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new DeploymentException("Cannot deploy: " + archive.getName(), ex);
        }
        return new ProtocolMetaData()
              .addContext(new JMXContext(mbeanServerInst.get()));
    }
View Full Code Here

        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

TOP

Related Classes of org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData

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.