else {
rawResult = amqpTemplate.convertSendAndReceive(routingKey, remoteInvocation);
}
if (rawResult == null) {
throw new RemoteProxyFailureException("No reply received - perhaps a timeout in the template?", null);
}
else if (!(rawResult instanceof RemoteInvocationResult)) {
throw new RemoteProxyFailureException("Expected a result of type "
+ RemoteInvocationResult.class.getCanonicalName() + " but found "
+ rawResult.getClass().getCanonicalName(), null);
}
RemoteInvocationResult result = (RemoteInvocationResult) rawResult;