use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.
the class EndpointPublisherImpl method destroy.
@Override
public void destroy(Context context) throws Exception {
List<Endpoint> eps = context.getEndpoints();
if (eps == null || eps.isEmpty()) {
return;
}
Deployment dep = eps.get(0).getService().getDeployment();
try {
stopWebApp(dep);
} finally {
undeploy(dep);
}
}
use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.
the class WebMetaDataCreator method createServlets.
/**
* Creates servlets part of web.xml descriptor.
* <p/>
* <pre>
* <servlet>
* <servlet-name>EJBEndpointShortName</servlet-name>
* <servlet-class>EJBEndpointTargetBeanName</servlet-class>
* </servlet>
* </pre>
*
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD) {
WSLogger.ROOT_LOGGER.trace("Creating servlets");
final JBossServletsMetaData servlets = WebMetaDataHelper.getServlets(jbossWebMD);
for (final Endpoint endpoint : dep.getService().getEndpoints()) {
final String endpointName = endpoint.getShortName();
final String endpointClassName = endpoint.getTargetBeanName();
WSLogger.ROOT_LOGGER.tracef("Servlet name: %s, class: %s", endpointName, endpointClassName);
WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
}
}
use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.
the class WebMetaDataCreator method createServletMappings.
/**
* Creates servlet-mapping part of web.xml descriptor.
* <p/>
* <pre>
* <servlet-mapping>
* <servlet-name>EJBEndpointShortName</servlet-name>
* <url-pattern>EJBEndpointURLPattern</url-pattern>
* </servlet-mapping>
* </pre>
*
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
private void createServletMappings(final Deployment dep, final JBossWebMetaData jbossWebMD) {
WSLogger.ROOT_LOGGER.trace("Creating servlet mappings");
final List<ServletMappingMetaData> servletMappings = WebMetaDataHelper.getServletMappings(jbossWebMD);
for (final Endpoint ep : dep.getService().getEndpoints()) {
if (ep instanceof HttpEndpoint) {
final String endpointName = ep.getShortName();
final List<String> urlPatterns = WebMetaDataHelper.getUrlPatterns(((HttpEndpoint) ep).getURLPattern());
WSLogger.ROOT_LOGGER.tracef("Servlet name: %s, URL patterns: %s", endpointName, urlPatterns);
WebMetaDataHelper.newServletMapping(endpointName, urlPatterns, servletMappings);
}
}
}
use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.
the class WebMetaDataCreator method getAuthMethod.
/**
* Returns deployment authentication method.
*
* @param dep webservice deployment
* @return deployment authentication method
*/
private String getAuthMethod(final Deployment dep) {
for (final Endpoint ejbEndpoint : dep.getService().getEndpoints()) {
final String beanAuthMethod = ejb3SecurityAccessor.getAuthMethod(ejbEndpoint);
final boolean hasBeanAuthMethod = beanAuthMethod != null;
if (hasBeanAuthMethod) {
// login-config/auth-method
return beanAuthMethod;
}
}
return null;
}
Aggregations