Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.servletunit
Class ServletUnitWebResponse  view ServletUnitWebResponse download ServletUnitWebResponse.java

java.lang.Object
  extended bycom.meterware.httpunit.WebResponse
      extended bycom.meterware.servletunit.ServletUnitWebResponse
All Implemented Interfaces:
com.meterware.httpunit.cookies.CookieSource, com.meterware.httpunit.HTMLSegment

class ServletUnitWebResponse
extends com.meterware.httpunit.WebResponse

A response from to a request from the simulated servlet environment.


Nested Class Summary
 
Nested classes inherited from class com.meterware.httpunit.WebResponse
com.meterware.httpunit.WebResponse.Scriptable
 
Field Summary
private  ServletUnitHttpResponse _response
           
 
Fields inherited from class com.meterware.httpunit.WebResponse
 
Constructor Summary
(package private) ServletUnitWebResponse(ServletUnitClient client, com.meterware.httpunit.FrameSelector frame, java.net.URL url, javax.servlet.http.HttpServletResponse response)
          Constructs a response object from a servlet response.
(package private) ServletUnitWebResponse(ServletUnitClient client, com.meterware.httpunit.FrameSelector frame, java.net.URL url, javax.servlet.http.HttpServletResponse response, boolean throwExceptionOnError)
          Constructs a response object from a servlet response.
 
Method Summary
 java.lang.String getHeaderField(java.lang.String fieldName)
          Returns the value for the specified header field.
 java.lang.String[] getHeaderFieldNames()
          Returns the names of the header fields found in the response.
 java.lang.String[] getHeaderFields(java.lang.String fieldName)
          Returns the values for the specified header field.
 int getResponseCode()
          Returns the response code associated with this response.
 java.lang.String getResponseMessage()
          Returns the response message associated with this response.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class com.meterware.httpunit.WebResponse
defineRawInputStream, getApplets, getCharacterSet, getContentLength, getContentType, getDOM, getElementNames, getElementsWithAttribute, getElementsWithName, getElementWithID, getExternalStyleSheet, getFirstMatchingForm, getFirstMatchingLink, getFirstMatchingTable, getFirstMatchingTextBlock, getForms, getFormWithID, getFormWithName, getFrameName, getFrameNames, getImages, getImageWithAltText, getImageWithName, getImageWithSource, getInputStream, getLinks, getLinkWith, getLinkWithID, getLinkWithImageText, getLinkWithName, getMatchingForms, getMatchingLinks, getMatchingTables, getMetaTagContent, getNewCookieNames, getNewCookieValue, getNextTextBlock, getRefreshDelay, getRefreshRequest, getScriptableObject, getSubframeContents, getTables, getTableStartingWith, getTableStartingWithPrefix, getTableWithID, getTableWithSummary, getText, getTextBlocks, getTitle, getURL, isHTML, loadResponseText, newDelegate, newResponse, setContentTypeHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_response

private ServletUnitHttpResponse _response
Constructor Detail

ServletUnitWebResponse

ServletUnitWebResponse(ServletUnitClient client,
                       com.meterware.httpunit.FrameSelector frame,
                       java.net.URL url,
                       javax.servlet.http.HttpServletResponse response,
                       boolean throwExceptionOnError)
                 throws java.io.IOException
Constructs a response object from a servlet response.


ServletUnitWebResponse

ServletUnitWebResponse(ServletUnitClient client,
                       com.meterware.httpunit.FrameSelector frame,
                       java.net.URL url,
                       javax.servlet.http.HttpServletResponse response)
                 throws java.io.IOException
Constructs a response object from a servlet response.

Method Detail

getResponseCode

public int getResponseCode()
Returns the response code associated with this response.


getResponseMessage

public java.lang.String getResponseMessage()
Returns the response message associated with this response.


getHeaderFieldNames

public java.lang.String[] getHeaderFieldNames()
Description copied from class: com.meterware.httpunit.WebResponse
Returns the names of the header fields found in the response.


getHeaderField

public java.lang.String getHeaderField(java.lang.String fieldName)
Returns the value for the specified header field. If no such field is defined, will return null.


getHeaderFields

public java.lang.String[] getHeaderFields(java.lang.String fieldName)
Description copied from interface: com.meterware.httpunit.cookies.CookieSource
Returns the values for the specified header field. If no such field is defined, will return an empty array.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).