+
+ if (responseMsg == null) {// timeout
+ if (timeoutException)
+ throw new SlcException("TIMEOUT: Query '" + query + "'"
+ + " with correlationId " + correlationId
+ + " sent to agent " + agentUuid + " timed out.");
+ else
+ return null;
+ }
+ if (log.isDebugEnabled())
+ log.debug("Received response for query '" + query
+ + "' with correlationId " + correlationId + " from agent "
+ + agentUuid);
+
+ try {
+ return fromMessage(responseMsg);
+ } catch (Exception e) {
+ throw new SlcException("Could not convert response from agent "
+ + agentUuid + " with correlationId " + correlationId
+ + " (query '" + query + "')", e);
+ }
+ }
+
+ protected Object fromMessage(Message message) throws JMSException {
+ return jmsTemplate.getMessageConverter().fromMessage(message);