if(! (transportSpec instanceof HttpSpec))
throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
HttpSpec httpSpec = (HttpSpec)transportSpec;
// Create JBossWebMetaData and attach it to the DeploymentUnit
Deployment topLevelDeployment = endpoint.getService().getDeployment();
// TODO: Somehow the ServletClass and InitParameter need to go from TransportSpec into generator
topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS, httpSpec.getServletClass());
topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS, httpSpec.getContextParameter());
JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
deploymentFactory.create(topLevelDeployment, jbwMetaData);
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);