org.fabric3.implementation.pojo.spi.proxy.WireProxyService.createObjectFactory()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(148)

本文整理了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

WireProxyService.createObjectFactory介绍

[英]Creates an ObjectFactory that provides proxies for the forward wire.
[中]创建一个ObjectFactory,为转发线路提供代理。

代码示例

代码示例来源:origin: org.codehaus.fabric3/fabric3-web

  1. protected <B> ObjectFactory<B> createWireFactory(Class<B> interfaze, Wire wire) throws ObjectCreationException {
  2. try {
  3. return proxyService.createObjectFactory(interfaze, wire, null);
  4. } catch (ProxyCreationException e) {
  5. throw new ObjectCreationException(e);
  6. }
  7. }

代码示例来源:origin: org.fabric3/fabric3-node-impl

  1. public void attach(NonManagedPhysicalWireSourceDefinition source, PhysicalWireTargetDefinition target, Wire wire) throws ContainerException {
  2. try {
  3. ClassLoader loader = registry.getClassLoader(source.getClassLoaderId());
  4. Class<?> interfaze = loader.loadClass(source.getInterface());
  5. Object proxy = proxyService.createObjectFactory(interfaze, wire, null).getInstance();
  6. source.setProxy(proxy);
  7. } catch (ClassNotFoundException e) {
  8. throw new ContainerException(e);
  9. }
  10. }

代码示例来源:origin: org.codehaus.fabric3/fabric3-spring

  1. public void attach(SpringSourceDefinition source, PhysicalTargetDefinition target, Wire wire) throws WiringException {
  2. SpringComponent component = getComponent(source);
  3. String referenceName = source.getReferenceName();
  4. ClassLoader loader = classLoaderRegistry.getClassLoader(source.getClassLoaderId());
  5. Class<?> interfaze;
  6. try {
  7. interfaze = loader.loadClass(source.getInterface());
  8. // note callbacks not supported for spring beans
  9. ObjectFactory<?> factory = proxyService.createObjectFactory(interfaze, wire, null);
  10. component.attach(referenceName, interfaze, factory);
  11. for (WireListener listener : listeners) {
  12. listener.onAttach(wire);
  13. }
  14. } catch (ClassNotFoundException e) {
  15. throw new WiringException(e);
  16. } catch (ProxyCreationException e) {
  17. throw new WiringException(e);
  18. }
  19. }

相关文章