org.apache.cxf.transport.http
Class Headers

java.lang.Object
  extended by org.apache.cxf.transport.http.Headers

public class Headers
extends Object


Field Summary
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
           
 
Constructor Summary
Headers(Message message)
           
 
Method Summary
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,org.apache.cxf.transport.http.Cookie> sessionCookies)
          Write cookie header from given session cookies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_HTTP_CONNECTION

public static final String KEY_HTTP_CONNECTION
This constant is the Message(Map) key for the HttpURLConnection that is used to get the response.

See Also:
Constant Field Values

PROTOCOL_HEADERS_CONTENT_TYPE

public static final String PROTOCOL_HEADERS_CONTENT_TYPE
Constructor Detail

Headers

public Headers(Message message)
Method Detail

writeSessionCookies

public void writeSessionCookies(Map<String,org.apache.cxf.transport.http.Cookie> sessionCookies)
Write cookie header from given session cookies

Parameters:
sessionCookies -

removeAuthorizationHeaders

public void removeAuthorizationHeaders()

setAuthorization

public void setAuthorization(String authorization)

setProxyAuthorization

public void setProxyAuthorization(String authorization)

getSetProtocolHeaders

public 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. If it is not set, an empty map is placed there, and then returned.

Parameters:
message - The outbound message
Returns:
The PROTOCOL_HEADERS map

readFromConnection

public void readFromConnection(HttpURLConnection connection)

setProtocolHeadersInConnection

public void setProtocolHeadersInConnection(HttpURLConnection connection)
                                    throws IOException
Set content type and protocol headers (Message.PROTOCOL_HEADERS) headers into the URL connection. Note, this does not mean they immediately get written to the output stream or the wire. They just just get set on the HTTP request.

Parameters:
connection -
Throws:
IOException

copyFromRequest

protected void copyFromRequest(javax.servlet.http.HttpServletRequest req)
Copy the request headers into the message.

Parameters:
message - the current message
headers - the current set of headers

copyToResponse

protected void copyToResponse(javax.servlet.http.HttpServletResponse response)
Copy the response headers into the response.

Parameters:
message - the current message
headers - the current set of headers

getAuthorization

public String getAuthorization()


Apache CXF