コード例 #1
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.jboss.arquillian.container.test.spi.client.protocol.Protocol#getExecutor(org.jboss.arquillian.container.test.spi.client.protocol.ProtocolConfiguration,
  *     org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData,
  *     org.jboss.arquillian.container.test.spi.command.CommandCallback)
  */
 @Override
 public ContainerMethodExecutor getExecutor(
     final DaemonProtocolConfiguration protocolConfiguration,
     final ProtocolMetaData metaData,
     final CommandCallback callback) {
   final Collection<DeploymentContext> contexts = metaData.getContexts(DeploymentContext.class);
   assert contexts.size() == 1 : "Should be exactly one deployment context";
   final DeploymentContext context = contexts.iterator().next();
   return new DaemonMethodExecutor(context);
 }
コード例 #2
0
 /* (non-Javadoc)
  * @see org.jboss.arquillian.spi.client.protocol.Protocol#getExecutor(org.jboss.arquillian.spi.client.protocol.ProtocolConfiguration, org.jboss.arquillian.spi.client.protocol.metadata.ProtocolMetaData)
  */
 @Override
 public ServletMethodExecutor getExecutor(
     ServletProtocolConfiguration protocolConfiguration,
     ProtocolMetaData metaData,
     CommandCallback callback) {
   Collection<HTTPContext> contexts = metaData.getContexts(HTTPContext.class);
   if (contexts.size() == 0) {
     throw new IllegalArgumentException(
         "No "
             + HTTPContext.class.getName()
             + " found in "
             + ProtocolMetaData.class.getName()
             + ". "
             + "Servlet protocol can not be used");
   }
   return new ServletMethodExecutor(protocolConfiguration, contexts, callback);
 }