public class Headers extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KEY_HTTP_CONNECTION
This constant is the Message(Map) key for the HttpURLConnection that
is used to get the response.
|
static String |
PROTOCOL_HEADERS_CONTENT_TYPE |
Modifier and Type | Method and Description |
---|---|
protected void |
copyFromRequest(javax.servlet.http.HttpServletRequest req)
Copy the request headers into the message.
|
protected void |
copyToResponse(javax.servlet.http.HttpServletResponse response)
Copy the response headers into the response.
|
String |
getAuthorization() |
static Map<String,List<String>> |
getSetProtocolHeaders(Message message)
While extracting the Message.PROTOCOL_HEADERS property from the Message,
this call ensures that the Message.PROTOCOL_HEADERS property is
set on the Message.
|
void |
readFromConnection(HttpURLConnection connection) |
void |
removeAuthorizationHeaders() |
void |
setAuthorization(String authorization) |
void |
setProtocolHeadersInConnection(HttpURLConnection connection)
Set content type and protocol headers (Message.PROTOCOL_HEADERS) headers into the URL
connection.
|
void |
setProxyAuthorization(String authorization) |
void |
writeSessionCookies(Map<String,Cookie> sessionCookies)
Write cookie header from given session cookies
|
public static final String KEY_HTTP_CONNECTION
public static final String PROTOCOL_HEADERS_CONTENT_TYPE
public Headers(Message message)
public void writeSessionCookies(Map<String,Cookie> sessionCookies)
sessionCookies
- public void removeAuthorizationHeaders()
public void setAuthorization(String authorization)
public void setProxyAuthorization(String authorization)
public static Map<String,List<String>> getSetProtocolHeaders(Message message)
message
- The outbound messagepublic void readFromConnection(HttpURLConnection connection)
public void setProtocolHeadersInConnection(HttpURLConnection connection) throws IOException
connection
- IOException
protected void copyFromRequest(javax.servlet.http.HttpServletRequest req)
message
- the current messageheaders
- the current set of headersprotected void copyToResponse(javax.servlet.http.HttpServletResponse response)
message
- the current messageheaders
- the current set of headerspublic String getAuthorization()
Apache CXF