chain.setTargetInvoker(invoker);
chain.prepare();
}
}
} else if (source instanceof Reference) {
Reference reference = (Reference) source;
InboundWire inboundWire = reference.getInboundWire();
Map<Operation<?>, InboundInvocationChain> inboundChains = inboundWire.getInvocationChains();
for (InboundInvocationChain chain : inboundChains.values()) {
//TODO handle async
// add target invoker on inbound side
ServiceContract contract = inboundWire.getServiceContract();
Operation operation = chain.getOperation();
TargetInvoker invoker = reference.createTargetInvoker(contract, operation);
chain.setTargetInvoker(invoker);
chain.prepare();
}
OutboundWire outboundWire = reference.getOutboundWire();
// connect the reference's inbound and outbound wires
connect(inboundWire, outboundWire, true);
if (reference instanceof CompositeReference) {
// For a composite reference only, since its outbound wire comes