本文整理了Java中org.fabric3.implementation.pojo.spi.proxy.WireProxyService.createSupplier()
方法的一些代码示例,展示了WireProxyService.createSupplier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WireProxyService.createSupplier()
方法的具体详情如下:
包路径:org.fabric3.implementation.pojo.spi.proxy.WireProxyService
类名称:WireProxyService
方法名:createSupplier
[英]Creates a Supplier that provides proxies for the forward wire.
[中]创建为正向导线提供代理的供应商。
代码示例来源:origin: com.carecon.fabric3/fabric3-web
private <B> Supplier<B> createWireFactory(Class<B> interfaze, Wire wire) throws Fabric3Exception {
return proxyService.createSupplier(interfaze, wire, null);
}
代码示例来源:origin: com.carecon.fabric3/fabric3-fabric
public void attach(NonManagedWireSource source, PhysicalWireTarget target, Wire wire) {
Class<?> interfaze = source.getInterface();
Object proxy = proxyService.createSupplier(interfaze, wire, null).get();
source.setProxy(proxy);
}
代码示例来源:origin: org.fabric3/fabric3-fabric
public void attach(NonManagedWireSource source, PhysicalWireTarget target, Wire wire) {
Class<?> interfaze = source.getInterface();
Object proxy = proxyService.createSupplier(interfaze, wire, null).get();
source.setProxy(proxy);
}
代码示例来源:origin: org.fabric3/fabric3-spring
public void attach(SpringWireSource source, PhysicalWireTarget target, Wire wire) {
SpringComponent component = getComponent(source);
String referenceName = source.getReferenceName();
ClassLoader loader = source.getClassLoader();
Class<?> interfaze;
try {
interfaze = loader.loadClass(source.getInterface());
// note callbacks not supported for spring beans
Supplier<?> supplier = proxyService.createSupplier(interfaze, wire, null);
component.attach(referenceName, interfaze, supplier);
for (WireListener listener : listeners) {
listener.onAttach(wire);
}
} catch (ClassNotFoundException e) {
throw new Fabric3Exception(e);
}
}
代码示例来源:origin: com.carecon.fabric3/fabric3-spring
public void attach(SpringWireSource source, PhysicalWireTarget target, Wire wire) {
SpringComponent component = getComponent(source);
String referenceName = source.getReferenceName();
ClassLoader loader = source.getClassLoader();
Class<?> interfaze;
try {
interfaze = loader.loadClass(source.getInterface());
// note callbacks not supported for spring beans
Supplier<?> supplier = proxyService.createSupplier(interfaze, wire, null);
component.attach(referenceName, interfaze, supplier);
for (WireListener listener : listeners) {
listener.onAttach(wire);
}
} catch (ClassNotFoundException e) {
throw new Fabric3Exception(e);
}
}
代码示例来源:origin: com.carecon.fabric3/fabric3-java
private void processReference(Wire wire, JavaWireSource source, PhysicalWireTarget target, JavaComponent component, Injectable injectable, Class<?> type) {
String callbackUri = null;
URI uri = target.getCallbackUri();
if (uri != null) {
callbackUri = uri.toString();
}
Supplier<?> supplier = proxyService.createSupplier(type, wire, callbackUri);
if (source.isKeyed() || source.isOrdered()) {
Object key = getKey(source, target);
int order = source.getOrder();
InjectionAttributes attributes = new InjectionAttributes(key, order);
component.setSupplier(injectable, supplier, attributes);
} else {
component.setSupplier(injectable, supplier);
}
}
代码示例来源:origin: com.carecon.fabric3/fabric3-system
public void attach(SystemWireSource source, PhysicalWireTarget target, Wire wire) {
if (proxyService == null) {
throw new Fabric3Exception("Attempt to inject a non-optimized wire during runtime bootstrap.");
}
URI sourceName = UriHelper.getDefragmentedName(source.getUri());
SystemComponent component = (SystemComponent) manager.getComponent(sourceName);
Injectable injectable = source.getInjectable();
Class<?> type = source.getInterfaceClass();
if (InjectableType.CALLBACK.equals(injectable.getType())) {
throw new UnsupportedOperationException("Callbacks are not supported on system components");
} else {
String callbackUri = null;
URI uri = target.getCallbackUri();
if (uri != null) {
callbackUri = uri.toString();
}
Supplier<?> factory = proxyService.createSupplier(type, wire, callbackUri);
if (source.isKeyed() || source.isOrdered()) {
Object key = getKey(source, target);
int order = source.getOrder();
InjectionAttributes attributes = new InjectionAttributes(key, order);
component.setSupplier(injectable, factory, attributes);
} else {
component.setSupplier(injectable, factory);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!