List of usage examples for com.amazonaws.services.s3.model GetObjectMetadataRequest getKey
public String getKey()
From source file:org.elasticsearch.cloud.aws.blobstore.MockAmazonS3.java
License:Apache License
@Override public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest) throws AmazonClientException, AmazonServiceException { String blobName = getObjectMetadataRequest.getKey(); if (!blobs.containsKey(blobName)) { throw new AmazonS3Exception("[" + blobName + "] does not exist."); }/*w w w. j a v a 2s .c om*/ return new ObjectMetadata(); // nothing is done with it }
From source file:org.elasticsearch.repositories.s3.MockAmazonS3.java
License:Apache License
@Override public ObjectMetadata getObjectMetadata(GetObjectMetadataRequest getObjectMetadataRequest) throws AmazonClientException, AmazonServiceException { simulateS3SocketConnection();// w ww.j a va2 s . c o m String blobName = getObjectMetadataRequest.getKey(); if (!blobs.containsKey(blobName)) { throw new AmazonS3Exception("[" + blobName + "] does not exist."); } return new ObjectMetadata(); // nothing is done with it }