org.jclouds.s3.functions
Class ParseObjectMetadataFromHeaders

java.lang.Object
  extended by 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:

Constructor Summary
ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser, BlobToObjectMetadata blobToObjectMetadata, String userMdPrefix)
           
 
Method Summary
protected  void addETagTo(HttpResponse from, MutableObjectMetadata metadata)
          ETag == Content-MD5
 MutableObjectMetadata apply(HttpResponse from)
          parses the http response headers to create a new org.jclouds.s3.domain.internal.MutableObjectMetadata object.
 ParseObjectMetadataFromHeaders setContext(HttpRequest request)
           
 ParseObjectMetadataFromHeaders setKey(String key)
           
 
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
 

Constructor Detail

ParseObjectMetadataFromHeaders

@Inject
public ParseObjectMetadataFromHeaders(ParseSystemAndUserMetadataFromHeaders blobMetadataParser,
                                             BlobToObjectMetadata blobToObjectMetadata,
                                             @Named(value="jclouds.blobstore.metaprefix")
                                             String userMdPrefix)
Method Detail

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.