// Clone the RubyHash to convert it to a normal Map based graph. This makes it possible
// to more safely transport the payload data out of the ruby app via a SwitchYard Exchange...
Map<String,Object> payload = deepClone(rubyHash);
// Create the exchange contract...
BaseExchangeContract exchangeContract = new BaseExchangeContract(operation);
// Set the input type...
exchangeContract.getInvokerInvocationMetaData().setInputType(JavaService.toMessageType(payload.getClass()));
if (operation.getExchangePattern() == ExchangePattern.IN_OUT) {
final BlockingQueue<Exchange> responseQueue = new ArrayBlockingQueue<Exchange>(1);
AtomicReference<ExchangeHandler> responseExchangeHandler = new AtomicReference<ExchangeHandler>(new ExchangeHandler() {