bindingContract = contract;
}
inboundWire.setServiceContract(bindingContract);
inboundWire.setContainer(service);
for (Operation<?> operation : bindingContract.getOperations().values()) {
InboundInvocationChain inboundChain = createInboundChain(operation);
inboundWire.addInvocationChain(operation, inboundChain);
}
OutboundWire outboundWire = new OutboundWireImpl();
outboundWire.setServiceContract(contract);
outboundWire.setTargetName(new QualifiedName(targetName));
outboundWire.setContainer(service);
for (Operation<?> operation : contract.getOperations().values()) {
OutboundInvocationChain outboundChain = createOutboundChain(operation);
outboundWire.addInvocationChain(operation, outboundChain);
}
// Add target callback chain to outbound wire, applicable to both bound and bindless services
if (contract.getCallbackName() != null) {
outboundWire.setCallbackInterface(contract.getCallbackClass());
for (Operation<?> operation : contract.getCallbackOperations().values()) {
InboundInvocationChain callbackTargetChain = createInboundChain(operation);
// TODO handle policy
//TODO statement below could be cleaner
callbackTargetChain.addInterceptor(new InvokerInterceptor());
outboundWire.addTargetCallbackInvocationChain(operation, callbackTargetChain);
}
}
// Not clear in any case why this is done here and at the parent composite level as well