sunlabs.brazil.server
Class TestRequest

java.lang.Object
  extended by sunlabs.brazil.server.Request
      extended by sunlabs.brazil.server.TestRequest (view source)

public class TestRequest
extends Request

Version of Request for testing purposes. Arranges for all output to be captured in one place so the ouput of a test may be compared with the expected output.


Nested Class Summary
 
Nested classes/interfaces inherited from class sunlabs.brazil.server.Request
Request.HttpOutputStream
 
Field Summary
 
Fields inherited from class sunlabs.brazil.server.Request
connectionHeader, headers, keepAlive, MAX_BLANKS, method, out, postData, props, protocol, query, responseHeaders, server, serverProps, serverProtocol, sock, startMillis, url, version
 
Constructor Summary
TestRequest(Server server, String request)
           
 
Method Summary
 String log()
           
 void log(int level, Object obj, String message)
          Logs a message by calling Server.log.
 Object put(String key, String value)
           
 String result()
           
 
Methods inherited from class sunlabs.brazil.server.Request
addHeader, addHeader, addSharedProps, getProtocol, getQueryData, getQueryData, getRequest, getRequestHeader, getReuseCount, getSocket, getStatus, log, redirect, removeSharedProps, replaceHeader, sendError, sendError, sendHeaders, sendResponse, sendResponse, sendResponse, sendResponse, sendResponse, serverUrl, setStatus, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestRequest

public TestRequest(Server server,
                   String request)
            throws IOException
Throws:
IOException
Method Detail

put

public Object put(String key,
                  String value)

log

public String log()

result

public String result()

log

public void log(int level,
                Object obj,
                String message)
Description copied from class: Request
Logs a message by calling Server.log. Typically a message is generated on the console or in a log file, if the level is less than the current server log setting.

Overrides:
log in class Request
Parameters:
level - The severity of the message.
obj - The object that the message relates to.
message - The message that will be logged.
See Also:
Server.log(int, Object, String)

Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.