本文整理了Java中org.jboss.wsf.spi.deployment.Endpoint.getInstanceProvider()
方法的一些代码示例,展示了Endpoint.getInstanceProvider()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Endpoint.getInstanceProvider()
方法的具体详情如下:
包路径:org.jboss.wsf.spi.deployment.Endpoint
类名称:Endpoint
方法名:getInstanceProvider
[英]Get instance provider
[中]获取实例提供程序
代码示例来源: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.ws.native/jbossws-native-core
private Handler getInstance(final HandlerInfo info) throws Exception
{
final Endpoint ep = EndpointAssociation.getEndpoint();
final Handler handler;
if (ep != null)
{
handler = (Handler)ep.getInstanceProvider().getInstance(info.getHandlerClass().getName()).getValue();
}
else
{
handler = (Handler)info.getHandlerClass().newInstance();
}
return handler;
}
代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration
private void setInjectionAwareInstanceProvider(final Endpoint ep) {
final InstanceProvider stackInstanceProvider = ep.getInstanceProvider();
final DeploymentUnit unit = ep.getService().getDeployment().getAttachment(DeploymentUnit.class);
final InstanceProvider injectionAwareInstanceProvider = new InjectionAwareInstanceProvider(stackInstanceProvider, ep, unit);
ep.setInstanceProvider(injectionAwareInstanceProvider);
}
代码示例来源:origin: org.jboss.as/jboss-as-webservices-server-integration
private void setInjectionAwareInstanceProvider(final Endpoint ep) {
final InstanceProvider stackInstanceProvider = ep.getInstanceProvider();
final DeploymentUnit unit = ep.getService().getDeployment().getAttachment(DeploymentUnit.class);
final InstanceProvider injectionAwareInstanceProvider = new InjectionAwareInstanceProvider(stackInstanceProvider, ep, unit);
ep.setInstanceProvider(injectionAwareInstanceProvider);
}
代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration
private void setInjectionAwareInstanceProvider(final Endpoint ep) {
final InstanceProvider stackInstanceProvider = ep.getInstanceProvider();
final DeploymentUnit unit = ep.getService().getDeployment().getAttachment(DeploymentUnit.class);
final InstanceProvider injectionAwareInstanceProvider = new InjectionAwareInstanceProvider(stackInstanceProvider, ep, unit);
ep.setInstanceProvider(injectionAwareInstanceProvider);
}
代码示例来源:origin: org.jboss.ws.cxf/jbossws-cxf-server
private static void injectServiceAndHandlerResources(Endpoint endpoint)
{
org.apache.cxf.endpoint.Endpoint ep = endpoint.getAttachment(org.apache.cxf.endpoint.Endpoint.class);
if (ep != null)
{
@SuppressWarnings("rawtypes")
List<Handler> chain = ((JaxWsEndpointImpl) ep).getJaxwsBinding().getHandlerChain();
if (chain != null)
{
for (Handler<?> handler : chain)
{
if (handler instanceof ConfigDelegateHandler)
{
handler = ((ConfigDelegateHandler<?>) handler).getDelegate();
}
final Reference handlerReference = endpoint.getInstanceProvider().getInstance(handler.getClass().getName());
if (!handlerReference.isInitialized()) {
final Object handlerInstance = handlerReference.getValue();
InjectionHelper.callPostConstructMethod(handlerInstance);
handlerReference.setInitialized();
}
}
}
}
}
代码示例来源:origin: org.jboss.ws/jbossws-common
/**
* Injects resources on target bean and calls post construct method.
* Finally it registers target bean for predestroy phase.
*
* @param endpoint used for predestroy phase registration process
* @param invocation current invocation
*/
@Override
public void onEndpointInstantiated(final Endpoint endpoint, final Invocation invocation)
{
final Object _targetBean = this.getTargetBean(invocation);
// TODO: refactor injection to AS IL
final Reference reference = endpoint.getInstanceProvider().getInstance(_targetBean.getClass().getName());
final Object targetBean = reference.getValue();
InjectionHelper.injectWebServiceContext(targetBean, ThreadLocalAwareWebServiceContext.getInstance());
if (!reference.isInitialized())
{
InjectionHelper.callPostConstructMethod(targetBean);
reference.setInitialized();
}
endpoint.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
}
代码示例来源:origin: jboss-switchyard/release
_context = _publisher.publish(contextRoot, tccl, urlPatternToClassNameMap, wsMetadata, jbwsMetadata);
for (org.jboss.wsf.spi.deployment.Endpoint ep : _context.getEndpoints()) {
BaseWebService wsProvider = (BaseWebService)ep.getInstanceProvider().getInstance(BaseWebService.class.getName()).getValue();
wsProvider.setInvocationClassLoader(tccl);
代码示例来源:origin: org.switchyard/switchyard-deploy-jboss-as7
BaseWebService wsProvider = (BaseWebService)ep.getInstanceProvider().getInstance(BaseWebService.class.getName()).getValue();
wsProvider.setInvocationClassLoader(tccl);
内容来源于网络,如有侵权,请联系作者删除!