com.bitmechanic.maxq.generator
Class Interchange

java.lang.Object
  extended by com.bitmechanic.maxq.generator.Interchange

public class Interchange
extends java.lang.Object

Describes browser / application interchange composed of one request and it's response.

Caveats: at this point, only few request headers are handled, response headers are not handled at all, request / repsonse cookies are not handled, and upload parameters are not processed correctly.

Character encodings: all byte -> String conversions are using platform default encoding. This is going to work in the following situations:

In all other cases, expect chaos and misery.

Version:
$Id: Interchange.java,v 1.1 2005/03/17 10:54:38 rkrzewsk Exp $
Author:
Rafal Krzewski, MaxQ community

Constructor Summary
Interchange(Config config, Interchange previous)
          Creates a new Interaction instance.
 
Method Summary
 java.util.Map getAllParameters()
          Returns the allParamters.
 java.lang.String getBaseUrl()
          Returns the base url.
 java.lang.String getContentType()
          Returns the contentType.
 java.util.Map getGetParameters()
          Returns the getParameters.
 java.lang.String getMethod()
          Returns the method.
 java.util.Map getPostParameters()
          Returns the postParameters.
 Interchange getPrevious()
          Returns the previous.
 java.util.Map getRequestCookies()
          Returns the requestCookies.
 java.util.Map getRequestHeaders()
          Returns the requestHeaders.
 java.lang.String getResponseBody()
          Returns the responseBody.
 java.util.Map getResponseCookies()
          Returns the responseCookies.
 java.util.Map getResponseHeaders()
          Returns the responseHeaders.
 java.lang.String getStatusCode()
          Returns the statusCode.
 java.util.Map getUploadParamters()
          Returns the uploadParamters.
 java.lang.String getUrl()
          Returns the url.
 boolean isIgnored()
          Returns the ignored.
 void processRequest(HttpRequestHeader header, byte[] body)
          Capture the request data.
 void processResposne(HttpRequestHeader header, byte[] body)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interchange

public Interchange(Config config,
                   Interchange previous)
Creates a new Interaction instance.

Parameters:
previous - the previous interaction.
Method Detail

getPrevious

public Interchange getPrevious()
Returns the previous.

Returns:
the previous.

isIgnored

public boolean isIgnored()
Returns the ignored.

Returns:
the ignored.

getBaseUrl

public java.lang.String getBaseUrl()
Returns the base url.

Returns:
the base url.

getUrl

public java.lang.String getUrl()
Returns the url.

Returns:
the url.

getMethod

public java.lang.String getMethod()
Returns the method.

Returns:
the method.

getRequestHeaders

public java.util.Map getRequestHeaders()
Returns the requestHeaders.

Returns:
the requestHeaders.

getRequestCookies

public java.util.Map getRequestCookies()
Returns the requestCookies.

Returns:
the requestCookies.

getGetParameters

public java.util.Map getGetParameters()
Returns the getParameters.

Returns:
the getParameters.

getPostParameters

public java.util.Map getPostParameters()
Returns the postParameters.

Returns:
the postParameters.

getAllParameters

public java.util.Map getAllParameters()
Returns the allParamters.

Returns:
the allParamters.

getUploadParamters

public java.util.Map getUploadParamters()
Returns the uploadParamters.

Returns:
the uploadParamters.

getStatusCode

public java.lang.String getStatusCode()
Returns the statusCode.

Returns:
the statusCode.

getContentType

public java.lang.String getContentType()
Returns the contentType.

Returns:
the contentType.

getResponseBody

public java.lang.String getResponseBody()
Returns the responseBody.

Returns:
the responseBody.

getResponseHeaders

public java.util.Map getResponseHeaders()
Returns the responseHeaders.

Returns:
the responseHeaders.

getResponseCookies

public java.util.Map getResponseCookies()
Returns the responseCookies.

Returns:
the responseCookies.

processRequest

public void processRequest(HttpRequestHeader header,
                           byte[] body)
Capture the request data.

Parameters:
header - request header.
body - request body.

processResposne

public void processResposne(HttpRequestHeader header,
                            byte[] body)