public class ParseObjectMetadataFromHeaders extends Object implements com.google.common.base.Function<HttpResponse,MutableObjectMetadata>, InvocationContext<ParseObjectMetadataFromHeaders>
Constructor and Description |
---|
ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser,
BlobToObjectMetadata blobToObjectMetadata,
String userMdPrefix) |
Modifier and Type | Method and Description |
---|---|
protected void |
addETagTo(HttpResponse from,
MutableObjectMetadata metadata)
ETag == Content-MD5
|
MutableObjectMetadata |
apply(HttpResponse from)
parses the http response headers to create a new
MutableObjectMetadata object. |
ParseObjectMetadataFromHeaders |
setContext(HttpRequest request) |
ParseObjectMetadataFromHeaders |
setKey(String key) |
@Inject public ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser, BlobToObjectMetadata blobToObjectMetadata, @Named(value="jclouds.blobstore.metaprefix") String userMdPrefix)
public MutableObjectMetadata apply(HttpResponse from)
MutableObjectMetadata
object.apply
in interface com.google.common.base.Function<HttpResponse,MutableObjectMetadata>
protected void addETagTo(HttpResponse from, MutableObjectMetadata metadata)
public ParseObjectMetadataFromHeaders setContext(HttpRequest request)
setContext
in interface InvocationContext<ParseObjectMetadataFromHeaders>
public ParseObjectMetadataFromHeaders setKey(String key)
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.