Class BindMetadataToHeaders
- java.lang.Object
-
- org.jclouds.openstack.swift.v1.binders.BindMetadataToHeaders
-
- All Implemented Interfaces:
Binder
- Direct Known Subclasses:
BindMetadataToHeaders.BindAccountMetadataToHeaders
,BindMetadataToHeaders.BindContainerMetadataToHeaders
,BindMetadataToHeaders.BindObjectMetadataToHeaders
,BindMetadataToHeaders.ForRemoval
public class BindMetadataToHeaders extends Object implements Binder
Will lower-case header keys due to a swift implementation to return headers in a different case than sent. ex.>> X-Account-Meta-MyDelete1: foo >> X-Account-Meta-MyDelete2: bar
results in:<< X-Account-Meta-Mydelete1: foo << X-Account-Meta-Mydelete2: bar
Note
HTTP response headers keys are known to be case-insensitive, but this practice of mixing up case will prevent metadata keys such as those in Turkish from working.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BindMetadataToHeaders.BindAccountMetadataToHeaders
static class
BindMetadataToHeaders.BindContainerMetadataToHeaders
static class
BindMetadataToHeaders.BindObjectMetadataToHeaders
static class
BindMetadataToHeaders.BindRemoveAccountMetadataToHeaders
static class
BindMetadataToHeaders.BindRemoveContainerMetadataToHeaders
static class
BindMetadataToHeaders.BindRemoveObjectMetadataToHeaders
static class
BindMetadataToHeaders.ForRemoval
-
Constructor Summary
Constructors Constructor Description BindMetadataToHeaders(String metadataPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends HttpRequest>
RbindToRequest(R request, Object input)
protected void
putMetadata(com.google.common.collect.ImmutableMultimap.Builder<String,String> headers, String key, String value)
com.google.common.collect.ImmutableMultimap<String,String>
toHeaders(Map<String,String> metadata)
-
-
-
Constructor Detail
-
BindMetadataToHeaders
public BindMetadataToHeaders(String metadataPrefix)
-
-
Method Detail
-
bindToRequest
public <R extends HttpRequest> R bindToRequest(R request, Object input)
- Specified by:
bindToRequest
in interfaceBinder
-
putMetadata
protected void putMetadata(com.google.common.collect.ImmutableMultimap.Builder<String,String> headers, String key, String value)
-
-