org.jclouds.s3.functions
Class ParseObjectMetadataFromHeaders
java.lang.Object
org.jclouds.s3.functions.ParseObjectMetadataFromHeaders
- All Implemented Interfaces:
- com.google.common.base.Function<HttpResponse,MutableObjectMetadata>, InvocationContext<ParseObjectMetadataFromHeaders>
public class ParseObjectMetadataFromHeaders
- extends Object
- implements com.google.common.base.Function<HttpResponse,MutableObjectMetadata>, InvocationContext<ParseObjectMetadataFromHeaders>
This parses @{link org.jclouds.s3.domain.internal.MutableObjectMetadata
from HTTP
headers.
- Author:
- Adrian Cole
- See Also:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.common.base.Function |
equals |
ParseObjectMetadataFromHeaders
@Inject
public ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser,
BlobToObjectMetadata blobToObjectMetadata,
@Named(value="jclouds.blobstore.metaprefix")
String userMdPrefix)
apply
public MutableObjectMetadata apply(HttpResponse from)
- parses the http response headers to create a new
org.jclouds.s3.domain.internal.MutableObjectMetadata
object.
- Specified by:
apply
in interface com.google.common.base.Function<HttpResponse,MutableObjectMetadata>
addETagTo
protected void addETagTo(HttpResponse from,
MutableObjectMetadata metadata)
- ETag == Content-MD5
setContext
public ParseObjectMetadataFromHeaders setContext(HttpRequest request)
- Specified by:
setContext
in interface InvocationContext<ParseObjectMetadataFromHeaders>
setKey
public ParseObjectMetadataFromHeaders setKey(String key)
Copyright © 2009-2011 jclouds. All Rights Reserved.