public abstract static class HttpMessage.Builder<T extends HttpMessage.Builder<T>> extends Object
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.ImmutableMultimap.Builder<String,String> |
headers |
protected Payload |
payload |
Constructor and Description |
---|
HttpMessage.Builder() |
Modifier and Type | Method and Description |
---|---|
T |
addHeader(String name,
String... values)
Note that if there's an existing header of the same name, this will only add the new value,
not replace it.
|
HttpMessage |
build() |
T |
fromHttpMessage(HttpMessage in) |
T |
headers(com.google.common.collect.Multimap<String,String> headers)
replaces all headers with the the supplied multimap.
|
T |
payload(byte[] payload) |
T |
payload(File payload) |
T |
payload(InputStream payload) |
T |
payload(Payload payload) |
T |
payload(String payload) |
T |
removeHeader(String name)
replace all headers that have the same keys as the input multimap
|
T |
replaceHeader(String name,
String... values)
Repla
|
T |
replaceHeaders(com.google.common.collect.Multimap<String,String> headers)
replace all headers that have the same keys as the input multimap
|
protected abstract T |
self() |
protected Payload payload
protected abstract T self()
public T payload(Payload payload)
PayloadEnclosingImpl.getPayload()
public T payload(byte[] payload)
PayloadEnclosingImpl.getPayload()
public T payload(File payload)
PayloadEnclosingImpl.getPayload()
public T payload(InputStream payload)
PayloadEnclosingImpl.getPayload()
public T payload(String payload)
PayloadEnclosingImpl.getPayload()
public T headers(com.google.common.collect.Multimap<String,String> headers)
HttpMessage.getHeaders()
public T replaceHeaders(com.google.common.collect.Multimap<String,String> headers)
HttpMessage.getHeaders()
public T removeHeader(String name)
HttpMessage.getHeaders()
public T addHeader(String name, String... values)
HttpMessage.getHeaders()
public T replaceHeader(String name, String... values)
HttpMessage.getHeaders()
public HttpMessage build()
public T fromHttpMessage(HttpMessage in)
Copyright © 2009-2013 jclouds. All Rights Reserved.