本文整理汇总了Java中javax.xml.ws.Endpoint.setExecutor方法的典型用法代码示例。如果您正苦于以下问题:Java Endpoint.setExecutor方法的具体用法?Java Endpoint.setExecutor怎么用?Java Endpoint.setExecutor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.xml.ws.Endpoint
的用法示例。
在下文中一共展示了Endpoint.setExecutor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: publishEndpoints
import javax.xml.ws.Endpoint; //导入方法依赖的package包/类
/**
* Publish all {@link javax.jws.WebService} annotated beans in the
* containing BeanFactory.
* @see #publishEndpoint
*/
public void publishEndpoints() {
Set<String> beanNames = new LinkedHashSet<String>(this.beanFactory.getBeanDefinitionCount());
beanNames.addAll(Arrays.asList(this.beanFactory.getBeanDefinitionNames()));
if (this.beanFactory instanceof ConfigurableBeanFactory) {
beanNames.addAll(Arrays.asList(((ConfigurableBeanFactory) this.beanFactory).getSingletonNames()));
}
for (String beanName : beanNames) {
try {
Class<?> type = this.beanFactory.getType(beanName);
if (type != null && !type.isInterface()) {
WebService wsAnnotation = type.getAnnotation(WebService.class);
WebServiceProvider wsProviderAnnotation = type.getAnnotation(WebServiceProvider.class);
if (wsAnnotation != null || wsProviderAnnotation != null) {
Endpoint endpoint = createEndpoint(this.beanFactory.getBean(beanName));
if (this.endpointProperties != null) {
endpoint.setProperties(this.endpointProperties);
}
if (this.executor != null) {
endpoint.setExecutor(this.executor);
}
if (wsAnnotation != null) {
publishEndpoint(endpoint, wsAnnotation);
}
else {
publishEndpoint(endpoint, wsProviderAnnotation);
}
this.publishedEndpoints.add(endpoint);
}
}
}
catch (CannotLoadBeanClassException ex) {
// ignore beans where the class is not resolvable
}
}
}