Package org.jclouds.atmos.functions
Class ParseObjectFromHeadersAndHttpContent
java.lang.Object
org.jclouds.atmos.functions.ParseObjectFromHeadersAndHttpContent
- All Implemented Interfaces:
com.google.common.base.Function<HttpResponse,,AtmosObject> Function<HttpResponse,,AtmosObject> InvocationContext<ParseObjectFromHeadersAndHttpContent>
public class ParseObjectFromHeadersAndHttpContent
extends Object
implements com.google.common.base.Function<HttpResponse,AtmosObject>, InvocationContext<ParseObjectFromHeadersAndHttpContent>
Parses response headers and creates a new AtmosObject from them and the HTTP content.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParseObjectFromHeadersAndHttpContent(ParseSystemMetadataFromHeaders systemMetadataParser, ParseUserMetadataFromHeaders userMetadataParser, AtmosObject.Factory objectProvider) -
Method Summary
Modifier and TypeMethodDescriptionapply(HttpResponse from) First, calls.invalid reference
ParseSystemAndUserMetadataFromHeaderssetContext(HttpRequest request) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
equals
-
Constructor Details
-
ParseObjectFromHeadersAndHttpContent
@Inject public ParseObjectFromHeadersAndHttpContent(ParseSystemMetadataFromHeaders systemMetadataParser, ParseUserMetadataFromHeaders userMetadataParser, AtmosObject.Factory objectProvider)
-
-
Method Details
-
apply
First, calls. Then, sets the object size based on the Content-Length header and adds the content to theinvalid reference
ParseSystemAndUserMetadataFromHeadersAtmosObjectresult.- Specified by:
applyin interfacecom.google.common.base.Function<HttpResponse,AtmosObject> - Specified by:
applyin interfaceFunction<HttpResponse,AtmosObject> - Throws:
HttpException
-
setContext
- Specified by:
setContextin interfaceInvocationContext<ParseObjectFromHeadersAndHttpContent>
-