}
public Exchange createExchange(ExchangePattern pattern, S3Object s3Object) {
LOG.trace("Getting object with key [{}] from bucket [{}]...", s3Object.getKey(), s3Object.getBucketName());
ObjectMetadata objectMetadata = s3Object.getObjectMetadata();
LOG.trace("Got object [{}]", s3Object);
Exchange exchange = new DefaultExchange(this, pattern);
Message message = exchange.getIn();
message.setBody(s3Object.getObjectContent());
message.setHeader(S3Constants.KEY, s3Object.getKey());
message.setHeader(S3Constants.BUCKET_NAME, s3Object.getBucketName());
message.setHeader(S3Constants.E_TAG, objectMetadata.getETag());
message.setHeader(S3Constants.LAST_MODIFIED, objectMetadata.getLastModified());
message.setHeader(S3Constants.VERSION_ID, objectMetadata.getVersionId());
message.setHeader(S3Constants.CONTENT_TYPE, objectMetadata.getContentType());
message.setHeader(S3Constants.CONTENT_MD5, objectMetadata.getContentMD5());
message.setHeader(S3Constants.CONTENT_LENGTH, objectMetadata.getContentLength());
message.setHeader(S3Constants.CONTENT_ENCODING, objectMetadata.getContentEncoding());
message.setHeader(S3Constants.CONTENT_DISPOSITION, objectMetadata.getContentDisposition());
message.setHeader(S3Constants.CACHE_CONTROL, objectMetadata.getCacheControl());
return exchange;
}