com.tivoli.am.fim.trustserver.sts.utilities
Class HttpResponse

java.lang.Object
  extended by com.tivoli.am.fim.trustserver.sts.utilities.HttpResponse

public class HttpResponse
extends java.lang.Object

This class stores the code and body of a HTTP response.


Field Summary
static java.lang.String HttpResponse_java_copyright
           
static java.lang.String HttpResponse_java_sourceCodeID
           
 
Constructor Summary
  HttpResponse()
           
protected HttpResponse(com.ibm.security.access.httpclient.HttpResponse hr)
           
 
Method Summary
 java.lang.String getBody()
           
 int getCode()
           
 java.lang.String[] getHeaderKeys()
          Get all the keys in the header.
 java.lang.String[] getHeaderValues(java.lang.String key)
          Get all the header values associated with given key.
protected  void setBody(java.lang.String body)
           
protected  void setCode(int code)
           
protected  void setHeaders(java.util.Map inputHeaders)
          Set the response header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HttpResponse_java_sourceCodeID

public static final java.lang.String HttpResponse_java_sourceCodeID
See Also:
Constant Field Values

HttpResponse_java_copyright

public static final java.lang.String HttpResponse_java_copyright
See Also:
Constant Field Values
Constructor Detail

HttpResponse

public HttpResponse()

HttpResponse

protected HttpResponse(com.ibm.security.access.httpclient.HttpResponse hr)
Method Detail

getCode

public int getCode()
Returns:
The HTTP response code. -1 if response code not set.

setCode

protected void setCode(int code)

getBody

public java.lang.String getBody()
Returns:
The HTTP response body.

setBody

protected void setBody(java.lang.String body)

getHeaderKeys

public java.lang.String[] getHeaderKeys()
Get all the keys in the header.

Returns:
String array of all keys in header. If there are no headers, an empty array is returned.

getHeaderValues

public java.lang.String[] getHeaderValues(java.lang.String key)
Get all the header values associated with given key.

Parameters:
key - Header key
Returns:
String array of header values associated with given key. If there are no headers, an empty array is returned.

setHeaders

protected void setHeaders(java.util.Map inputHeaders)
Set the response header. This wipes out previously stored headers.

Parameters:
inputHeaders - Map ( String, List(String) )