本文整理了Java中org.fabric3.implementation.pojo.spi.proxy.WireProxyService.createObjectFactory()
方法的一些代码示例,展示了WireProxyService.createObjectFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WireProxyService.createObjectFactory()
方法的具体详情如下:
包路径:org.fabric3.implementation.pojo.spi.proxy.WireProxyService
类名称:WireProxyService
方法名:createObjectFactory
[英]Creates an ObjectFactory that provides proxies for the forward wire.
[中]创建一个ObjectFactory,为转发线路提供代理。
代码示例来源:origin: org.codehaus.fabric3/fabric3-web
protected <B> ObjectFactory<B> createWireFactory(Class<B> interfaze, Wire wire) throws ObjectCreationException {
try {
return proxyService.createObjectFactory(interfaze, wire, null);
} catch (ProxyCreationException e) {
throw new ObjectCreationException(e);
}
}
代码示例来源:origin: org.fabric3/fabric3-node-impl
public void attach(NonManagedPhysicalWireSourceDefinition source, PhysicalWireTargetDefinition target, Wire wire) throws ContainerException {
try {
ClassLoader loader = registry.getClassLoader(source.getClassLoaderId());
Class<?> interfaze = loader.loadClass(source.getInterface());
Object proxy = proxyService.createObjectFactory(interfaze, wire, null).getInstance();
source.setProxy(proxy);
} catch (ClassNotFoundException e) {
throw new ContainerException(e);
}
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-spring
public void attach(SpringSourceDefinition source, PhysicalTargetDefinition target, Wire wire) throws WiringException {
SpringComponent component = getComponent(source);
String referenceName = source.getReferenceName();
ClassLoader loader = classLoaderRegistry.getClassLoader(source.getClassLoaderId());
Class<?> interfaze;
try {
interfaze = loader.loadClass(source.getInterface());
// note callbacks not supported for spring beans
ObjectFactory<?> factory = proxyService.createObjectFactory(interfaze, wire, null);
component.attach(referenceName, interfaze, factory);
for (WireListener listener : listeners) {
listener.onAttach(wire);
}
} catch (ClassNotFoundException e) {
throw new WiringException(e);
} catch (ProxyCreationException e) {
throw new WiringException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!