Package org.jclouds.s3.functions
Class ParseObjectMetadataFromHeaders
- java.lang.Object
-
- org.jclouds.s3.functions.ParseObjectMetadataFromHeaders
-
- All Implemented Interfaces:
com.google.common.base.Function<HttpResponse,MutableObjectMetadata>
,Function<HttpResponse,MutableObjectMetadata>
,InvocationContext<ParseObjectMetadataFromHeaders>
public class ParseObjectMetadataFromHeaders extends Object implements com.google.common.base.Function<HttpResponse,MutableObjectMetadata>, InvocationContext<ParseObjectMetadataFromHeaders>
This parses {@ link MutableObjectMetadata} from HTTP headers.
-
-
Constructor Summary
Constructors Constructor Description ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser, BlobToObjectMetadata blobToObjectMetadata, String userMdPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addETagTo(HttpResponse from, MutableObjectMetadata metadata)
ETag == Content-MD5MutableObjectMetadata
apply(HttpResponse from)
parses the http response headers to create a newMutableObjectMetadata
object.ParseObjectMetadataFromHeaders
setContext(HttpRequest request)
ParseObjectMetadataFromHeaders
setKey(String key)
-
-
-
Constructor Detail
-
ParseObjectMetadataFromHeaders
@Inject public ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser, BlobToObjectMetadata blobToObjectMetadata, @Named("jclouds.blobstore.metaprefix") String userMdPrefix)
-
-
Method Detail
-
apply
public MutableObjectMetadata apply(HttpResponse from)
parses the http response headers to create a newMutableObjectMetadata
object.- Specified by:
apply
in interfacecom.google.common.base.Function<HttpResponse,MutableObjectMetadata>
- Specified by:
apply
in interfaceFunction<HttpResponse,MutableObjectMetadata>
-
addETagTo
protected void addETagTo(HttpResponse from, MutableObjectMetadata metadata)
ETag == Content-MD5
-
setContext
public ParseObjectMetadataFromHeaders setContext(HttpRequest request)
- Specified by:
setContext
in interfaceInvocationContext<ParseObjectMetadataFromHeaders>
-
setKey
public ParseObjectMetadataFromHeaders setKey(String key)
-
-