com.sapportals.wcm.util.http

Interface IResponse


public interface IResponse

IWDResponse represents the response to a HTTP request, as performed with an IWDRequest.

Whether the IWDResponse keeps a Document is influenced by two factors:

  1. when the IWDRequest indicated that a response document is expected
  2. when the response carried a 207 status code with content type text/xml
However the document may still be null due to missing response body, etc.

Whether the IWDResponse keeps a InputStream is influenced mainly by the indication in the IWDRequest, namely if the client indicates that he would like to get the response as a InputStream.

Copyright (c) SAP AG 2001-2002


Method Summary
 long getContentLength()
           
 String getContentType()
           
 Document getDocument()
           
 String getHeader(String name)
           
 Iterator getHeaderNames()
           
 String getHttpVersion()
           
 int getStatus()
           
 String getStatusDescription()
           
 InputStream getStream()
           
 boolean hasDocument()
           
 boolean hasStream()
           
 

Method Detail

getDocument

Document getDocument()
Returns:
the parsed XML Document from the HTTP response or null

getStream

InputStream getStream()
Returns:
an InputStream to read the body of a HTTP response from or null

getContentType

String getContentType()
Returns:
the mime type of the response body or null if not specified

getContentLength

long getContentLength()
Returns:
the length of the HTTP response body or -1 if not specified

getHeader

String getHeader(String name)
Parameters:
name - TBD: Description of the incoming method parameter
Returns:
the HTTP header field with given name or null if not specified

getHeaderNames

Iterator getHeaderNames()
Returns:
enumeration of all header fields in HTTP response

getHttpVersion

String getHttpVersion()
Returns:
HTTP version string (RFC2616, section 3.1)

getStatus

int getStatus()
Returns:
HTTP status code of response

getStatusDescription

String getStatusDescription()
Returns:
HTTP status description of response

hasDocument

boolean hasDocument()
Returns:
if HTTP response contained a valid XML document

hasStream

boolean hasStream()
Returns:
if InputStream for HTTP body is available
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice