org.jboss.wsf.spi.deployment.Endpoint.getTargetBeanName()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(12.9k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getTargetBeanName()方法的一些代码示例,展示了Endpoint.getTargetBeanName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getTargetBeanName()方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getTargetBeanName

Endpoint.getTargetBeanName介绍

[英]Get the endpoint implementation bean
[中]获取端点实现bean

代码示例

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
  this.delegate = delegate;
  endpointName = endpoint.getShortName();
  endpointClass = endpoint.getTargetBeanName();
  componentPrefix = unit.getServiceName().append("component");
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
  this.delegate = delegate;
  endpointName = endpoint.getShortName();
  endpointClass = endpoint.getTargetBeanName();
  componentPrefix = unit.getServiceName().append("component");
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private InjectionAwareInstanceProvider(final InstanceProvider delegate, final Endpoint endpoint, final DeploymentUnit unit) {
  this.delegate = delegate;
  endpointName = endpoint.getShortName();
  endpointClass = endpoint.getTargetBeanName();
  componentPrefix = unit.getServiceName().append("component");
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

private static ServiceName getEJBViewMethodSecurityAttributesServiceName(final DeploymentUnit unit, final Endpoint endpoint) {
  for (EJBEndpoint ep : ASHelper.getJaxwsEjbs(unit)) {
    if (ep.getClassName().equals(endpoint.getTargetBeanName())) {
      return ep.getEJBViewMethodSecurityAttributesService();
    }
  }
  return null;
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

private static ServiceName getEJBViewMethodSecurityAttributesServiceName(final DeploymentUnit unit, final Endpoint endpoint) {
  for (EJBEndpoint ep : ASHelper.getJaxwsEjbs(unit)) {
    if (ep.getClassName().equals(endpoint.getTargetBeanName())) {
      return ep.getEJBViewMethodSecurityAttributesService();
    }
  }
  return null;
}

代码示例来源:origin: org.jboss.ws.native/jbossws-native-core

private Object getEndpointInstance()
{
 synchronized(endpoint) 
 {
   try
   {
     final String endpointClassName = endpoint.getTargetBeanName();
     return endpoint.getInstanceProvider().getInstance(endpointClassName).getValue();
   }
   catch (Exception ex)
   {
     throw new IllegalStateException(ex);
   }
 }
}

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

@Override
public void start(final Deployment dep) {
  final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  if (unit instanceof WSEndpointDeploymentUnit) return;
  for (final Endpoint endpoint : dep.getService().getEndpoints()) {
    ModelNode op = null;
    try {
      op = unit.createDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
          PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
    } catch (final UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    op.get(ENDPOINT_NAME).set(getName(endpoint));
    op.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
    op.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
    op.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
    op.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

@Override
public void start(final Deployment dep) {
  final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  if (unit instanceof WSEndpointDeploymentUnit) return;
  final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT);
  for (final Endpoint endpoint : dep.getService().getEndpoints()) {
    final ModelNode endpointModel;
    try {
      endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
          PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
    } catch (final UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    endpointModel.get(ENDPOINT_NAME).set(getName(endpoint));
    endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
    endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
    endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
    endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  }
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

@Override
public void start(final Deployment dep) {
  final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  if (unit instanceof WSEndpointDeploymentUnit) return;
  final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT);
  for (final Endpoint endpoint : dep.getService().getEndpoints()) {
    final ModelNode endpointModel;
    try {
      endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
          PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
    } catch (final UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
    endpointModel.get(ENDPOINT_NAME).set(getName(endpoint));
    endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
    endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
    endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
    endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss421

public void create(Deployment dep, WSFRuntime rruntime)
{
 RewriteResults results = webXMLRewriter.rewriteWebXml(dep);
 // The endpoint may not have a target bean when 
 // <servlet-class> originally contained a javax.servlet.Servlet
 for (Endpoint ep : dep.getService().getEndpoints())
 {
   if (ep.getTargetBeanName() == null)
   {
    String servletName = ep.getShortName();
    String beanClassName = results.sepTargetMap.get(servletName);
    if (beanClassName == null)
      throw new IllegalStateException("Cannot obtain target bean for: " + servletName);
    ep.setTargetBeanName(beanClassName);
   }
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss423x

public void create(Deployment dep, WSFRuntime runtime)
  {
   RewriteResults results = webXMLRewriter.rewriteWebXml(dep);

   // The endpoint may not have a target bean when 
   // <servlet-class> originally contained a javax.servlet.Servlet
   for (Endpoint ep : dep.getService().getEndpoints())
   {
     if (ep.getTargetBeanName() == null)
     {
      String servletName = ep.getShortName();
      String beanClassName = results.sepTargetMap.get(servletName);
      if (beanClassName == null)
        throw new IllegalStateException("Cannot obtain target bean for: " + servletName);

      ep.setTargetBeanName(beanClassName);
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss423

public void create(Deployment dep)
  {
   RewriteResults results = webXMLRewriter.rewriteWebXml(dep);

   // The endpoint may not have a target bean when 
   // <servlet-class> originally contained a javax.servlet.Servlet
   for (Endpoint ep : dep.getService().getEndpoints())
   {
     if (ep.getTargetBeanName() == null)
     {
      String servletName = ep.getShortName();
      String beanClassName = results.sepTargetMap.get(servletName);
      if (beanClassName == null)
        throw new IllegalStateException("Cannot obtain target bean for: " + servletName);

      ep.setTargetBeanName(beanClassName);
     }
   }
  }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss510

/**
* Creates servlets part of web.xml descriptor.
*
* <pre>
* &lt;servlet&gt;
*   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
*   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
* &lt;/servlet&gt;
* </pre>
*
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
 this.log.debug("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();
   this.log.debug("Servlet name: " + endpointName + ", servlet class: " + endpointClassName);
   WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss501

/**
* Creates servlets part of web.xml descriptor.
*
* <pre>
* &lt;servlet&gt;
*   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
*   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
* &lt;/servlet&gt;
* </pre>
*
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
 this.log.debug("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();
   this.log.debug("Servlet name: " + endpointName + ", servlet class: " + endpointClassName);
   WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
 }
}

代码示例来源:origin: org.jboss.ws/jbossws-jboss600M2

/**
* Creates servlets part of web.xml descriptor.
*
* <pre>
* &lt;servlet&gt;
*   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
*   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
* &lt;/servlet&gt;
* </pre>
*
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
 this.log.debug("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();
   this.log.debug("Servlet name: " + endpointName + ", servlet class: " + endpointClassName);
   WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
 }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

epNames.add(ep.getTargetBeanName());

代码示例来源:origin: org.jboss.ws/jbossws-framework

String name = ep.getTargetBeanName();
String shortName = name.substring(name.lastIndexOf('.') + 1);
ep.setShortName(shortName);

代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration

/**
 * Creates servlets part of web.xml descriptor.
 * <p/>
 * <pre>
 * &lt;servlet&gt;
 *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
 *   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
 * &lt;/servlet&gt;
 * </pre>
 *
 * @param dep        webservice deployment
 * @param jbossWebMD jboss web meta data
 */
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD) {
  ROOT_LOGGER.creatingServlets();
  final JBossServletsMetaData servlets = WebMetaDataHelper.getServlets(jbossWebMD);
  for (final Endpoint endpoint : dep.getService().getEndpoints()) {
    final String endpointName = endpoint.getShortName();
    final String endpointClassName = endpoint.getTargetBeanName();
    ROOT_LOGGER.creatingServlet(endpointName, endpointClassName);
    WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
  }
}

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

/**
 * Creates servlets part of web.xml descriptor.
 * <p/>
 * <pre>
 * &lt;servlet&gt;
 *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
 *   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
 * &lt;/servlet&gt;
 * </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);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

/**
 * Creates servlets part of web.xml descriptor.
 * <p/>
 * <pre>
 * &lt;servlet&gt;
 *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
 *   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
 * &lt;/servlet&gt;
 * </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);
  }
}

相关文章