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

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

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

Endpoint.getType介绍

[英]Get endpoint type
[中]获取端点类型

代码示例

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

  1. /**
  2. * Returns true if endpoint represents JAXWS JSE endpoint.
  3. *
  4. * @param ep webservice endpoint
  5. * @return true if either JAXWS JSE endpoint, false otherwise
  6. */
  7. public static boolean isJaxwsJseEndpoint( final Endpoint ep )
  8. {
  9. return JAXWS_JSE == ep.getType();
  10. }

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

  1. /**
  2. * Returns true if endpoint represents JAXWS EJB3 endpoint.
  3. *
  4. * @param ep webservice endpoint
  5. * @return true if JAXWS EJB3 endpoint, false otherwise
  6. */
  7. public static boolean isJaxwsEjbEndpoint( final Endpoint ep )
  8. {
  9. return JAXWS_EJB3 == ep.getType();
  10. }

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

  1. @Override
  2. public List<Endpoint> getEndpoints(final EndpointTypeFilter filter)
  3. {
  4. List<Endpoint> result = new LinkedList<Endpoint>();
  5. for (Endpoint endpoint : endpoints)
  6. {
  7. if (filter.accept(endpoint.getType()))
  8. {
  9. result.add(endpoint);
  10. }
  11. }
  12. return Collections.unmodifiableList(result);
  13. }

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

  1. @Override
  2. public void start(final Deployment dep) {
  3. final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  4. if (unit instanceof WSEndpointDeploymentUnit) return;
  5. for (final Endpoint endpoint : dep.getService().getEndpoints()) {
  6. ModelNode op = null;
  7. try {
  8. op = unit.createDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
  9. PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
  10. } catch (final UnsupportedEncodingException e) {
  11. throw new RuntimeException(e);
  12. }
  13. op.get(ENDPOINT_NAME).set(getName(endpoint));
  14. op.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
  15. op.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
  16. op.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
  17. op.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  18. }
  19. }

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

  1. @Override
  2. public void start(final Deployment dep) {
  3. final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  4. if (unit instanceof WSEndpointDeploymentUnit) return;
  5. final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT);
  6. for (final Endpoint endpoint : dep.getService().getEndpoints()) {
  7. final ModelNode endpointModel;
  8. try {
  9. endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
  10. PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
  11. } catch (final UnsupportedEncodingException e) {
  12. throw new RuntimeException(e);
  13. }
  14. endpointModel.get(ENDPOINT_NAME).set(getName(endpoint));
  15. endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
  16. endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
  17. endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
  18. endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  19. }
  20. }

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

  1. @Override
  2. public void start(final Deployment dep) {
  3. final DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
  4. if (unit instanceof WSEndpointDeploymentUnit) return;
  5. final DeploymentResourceSupport deploymentResourceSupport = unit.getAttachment(Attachments.DEPLOYMENT_RESOURCE_SUPPORT);
  6. for (final Endpoint endpoint : dep.getService().getEndpoints()) {
  7. final ModelNode endpointModel;
  8. try {
  9. endpointModel = deploymentResourceSupport.getDeploymentSubModel(WSExtension.SUBSYSTEM_NAME,
  10. PathElement.pathElement(ENDPOINT, URLEncoder.encode(getId(endpoint), "UTF-8")));
  11. } catch (final UnsupportedEncodingException e) {
  12. throw new RuntimeException(e);
  13. }
  14. endpointModel.get(ENDPOINT_NAME).set(getName(endpoint));
  15. endpointModel.get(ENDPOINT_CONTEXT).set(getContext(endpoint));
  16. endpointModel.get(ENDPOINT_CLASS).set(endpoint.getTargetBeanName());
  17. endpointModel.get(ENDPOINT_TYPE).set(endpoint.getType().toString());
  18. endpointModel.get(ENDPOINT_WSDL).set(endpoint.getAddress() + "?wsdl");
  19. }
  20. }

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

  1. private InvocationHandler getInvocationHandler(final Endpoint ep)
  2. {
  3. final InvocationType invocationType = InvocationType.valueOf(ep.getType().toString());
  4. return spiProvider.getSPI(InvocationHandlerFactory.class).newInvocationHandler(invocationType);
  5. }

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

  1. private static boolean isElytronSecurityDomain(Endpoint endpoint, String domainName) {
  2. final ServiceName serviceName;
  3. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  4. serviceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY.getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class);
  5. } else {
  6. serviceName = ELYTRON_DOMAIN_CAPABILITY.getCapabilityServiceName(domainName, SecurityDomain.class);
  7. }
  8. return currentServiceContainer().getService(serviceName) != null;
  9. }

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

  1. private static boolean isElytronSecurityDomain(Endpoint endpoint, String domainName) {
  2. final ServiceName serviceName;
  3. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  4. serviceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY.getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class);
  5. } else {
  6. serviceName = ELYTRON_DOMAIN_CAPABILITY.getCapabilityServiceName(domainName, SecurityDomain.class);
  7. }
  8. return currentServiceContainer().getService(serviceName) != null;
  9. }

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

  1. endpoint.setProperty(SECURITY_DOMAIN_NAME, domainName);
  2. if (isElytronSecurityDomain(endpoint, domainName)) {
  3. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  4. ServiceName ejbSecurityDomainServiceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY
  5. .getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class);
  6. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  7. builder.addDependency(getEJBViewMethodSecurityAttributesServiceName(unit, endpoint),
  8. EJBViewMethodSecurityAttributesService.class, service.getEJBMethodSecurityAttributeServiceInjector());

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

  1. endpoint.setProperty(SECURITY_DOMAIN_NAME, domainName);
  2. if (isElytronSecurityDomain(endpoint, domainName)) {
  3. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  4. ServiceName ejbSecurityDomainServiceName = APPLICATION_SECURITY_DOMAIN_RUNTIME_CAPABILITY
  5. .getCapabilityServiceName(domainName, ApplicationSecurityDomainService.ApplicationSecurityDomain.class);
  6. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  7. ejbMethodSecurityAttributeService = builder.requires(getEJBViewMethodSecurityAttributesServiceName(unit, endpoint));

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

  1. @Override
  2. public void start(final StartContext context) {
  3. WSLogger.ROOT_LOGGER.starting(name);
  4. final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME);
  5. if (isElytronSecurityDomain(endpoint, domainName)) {
  6. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  7. endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomain.get().getSecurityDomain()));
  8. } else {
  9. endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.get()));
  10. }
  11. } else {
  12. endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContext.get()));
  13. }
  14. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  15. final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = this.ejbMethodSecurityAttributeService.get();
  16. endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService));
  17. }
  18. final List<RecordProcessor> processors = endpoint.getRecordProcessors();
  19. for (final RecordProcessor processor : processors) {
  20. registerRecordProcessor(processor, endpoint);
  21. }
  22. final EndpointMetricsFactory endpointMetricsFactory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
  23. endpoint.setEndpointMetrics(endpointMetricsFactory.newEndpointMetrics());
  24. registerEndpoint(endpoint);
  25. endpoint.getLifecycleHandler().start(endpoint);
  26. ServiceContainerEndpointRegistry.register(aliasName, endpoint);
  27. endpointConsumer.accept(endpoint);
  28. }

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

  1. @Override
  2. public void start(final StartContext context) throws StartException {
  3. WSLogger.ROOT_LOGGER.starting(name);
  4. final String domainName = (String)endpoint.getProperty(SECURITY_DOMAIN_NAME);
  5. if (isElytronSecurityDomain(endpoint, domainName)) {
  6. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  7. endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.ejbApplicationSecurityDomainValue.getValue().getSecurityDomain()));
  8. } else {
  9. endpoint.setSecurityDomainContext(new ElytronSecurityDomainContextImpl(this.elytronSecurityDomain.getValue()));
  10. }
  11. } else {
  12. endpoint.setSecurityDomainContext(new SecurityDomainContextImpl(securityDomainContextValue.getValue()));
  13. }
  14. if (EndpointType.JAXWS_EJB3.equals(endpoint.getType())) {
  15. final EJBViewMethodSecurityAttributesService ejbMethodSecurityAttributeService = ejbMethodSecurityAttributeServiceValue.getValue();
  16. endpoint.addAttachment(EJBMethodSecurityAttributeProvider.class, new EJBMethodSecurityAttributesAdaptor(ejbMethodSecurityAttributeService));
  17. }
  18. final List<RecordProcessor> processors = endpoint.getRecordProcessors();
  19. for (final RecordProcessor processor : processors) {
  20. registerRecordProcessor(processor, endpoint);
  21. }
  22. final EndpointMetricsFactory factory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
  23. endpoint.setEndpointMetrics(factory.newEndpointMetrics());
  24. registerEndpoint(endpoint);
  25. endpoint.getLifecycleHandler().start(endpoint);
  26. }

相关文章