Object replyTo = message.getReplyTo();
if (replyTo != null)
{
if (cachedReplyToHandler.get() == null)
{
ReplyToHandler replyToHandler = ((AbstractConnector) endpoint.getConnector()).getReplyToHandler(endpoint);
// Use the response transformer for the event if one is set
if (endpoint.getResponseTransformers() != null)
{
replyToHandler.setTransformers(endpoint.getResponseTransformers());
}
cachedReplyToHandler.compareAndSet(null, replyToHandler);
}
return cachedReplyToHandler.get();
}