public class HarRequest
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | TABLE_NAMEDatabase table name where the data is stored | 
| Constructor and Description | 
|---|
| HarRequest(HarDatabaseConfig config,
          long entryId)Creates a new  HarRequestobject from a database. | 
| HarRequest(org.codehaus.jackson.JsonParser jp,
          java.util.List<HarWarning> warnings)Creates a new  HarRequestobject from a JsonParser already
 positioned at the beginning of the element content | 
| HarRequest(java.lang.String method,
          java.lang.String url,
          java.lang.String httpVersion,
          HarCookies cookies,
          HarHeaders headers,
          HarQueryString queryString,
          HarPostData postData,
          long headersSize,
          long bodySize,
          java.lang.String comment)Creates a new  HarRequestobject | 
| HarRequest(java.lang.String method,
          java.lang.String url,
          java.lang.String httpVersion,
          HarCookies cookies,
          HarHeaders headers,
          HarQueryString queryString,
          long headersSize,
          long bodySize)Creates a new  HarRequestobject with all mandatory parameters | 
| Modifier and Type | Method and Description | 
|---|---|
| void | deleteFromJDBC(HarDatabaseConfig config,
              long logId,
              boolean dropTables)Delete objects in the database referencing the specified logId. | 
| long | getBodySize()Returns the bodySize value. | 
| java.lang.String | getComment()Returns the comment value. | 
| HarCookies | getCookies()Returns the cookies value. | 
| HarCustomFields | getCustomFields()Returns the customFields value. | 
| HarHeaders | getHeaders()Returns the headers value. | 
| long | getHeadersSize()Returns the headersSize value. | 
| java.lang.String | getHttpVersion()Returns the httpVersion value. | 
| java.lang.String | getMethod()Returns the method value. | 
| HarPostData | getPostData()Returns the postData value. | 
| HarQueryString | getQueryString()Returns the queryString value. | 
| java.lang.String | getUrl()Returns the url value. | 
| void | setBodySize(long bodySize)Sets the bodySize value. | 
| void | setComment(java.lang.String comment)Sets the comment value. | 
| void | setCookies(HarCookies cookies)Sets the cookies value. | 
| void | setCustomFields(HarCustomFields customFields)Sets the customFields value. | 
| void | setHeaders(HarHeaders headers)Sets the headers value. | 
| void | setHeadersSize(long headersSize)Sets the headersSize value. | 
| void | setHttpVersion(java.lang.String httpVersion)Sets the httpVersion value. | 
| void | setMethod(java.lang.String method)Sets the method value. | 
| void | setPostData(HarPostData postData)Sets the postData value. | 
| void | setQueryString(HarQueryString queryString)Sets the queryString value. | 
| void | setUrl(java.lang.String url)Sets the url value. | 
| java.lang.String | toString() | 
| void | writeHar(org.codehaus.jackson.JsonGenerator g)Write this object on a JsonGenerator stream | 
| void | writeJDBC(long entryId,
         HarDatabaseConfig config,
         long logId)Write this object to a database according to the given configuration | 
public static java.lang.String TABLE_NAME
public HarRequest(java.lang.String method,
          java.lang.String url,
          java.lang.String httpVersion,
          HarCookies cookies,
          HarHeaders headers,
          HarQueryString queryString,
          HarPostData postData,
          long headersSize,
          long bodySize,
          java.lang.String comment)
HarRequest objectmethod - method [string] - Request method (GET, POST, ...).url - url [string] - Absolute URL of the request (fragments are not
          included).httpVersion - httpVersion [string] - Request HTTP Version.cookies - cookies [array] - List of cookie objects.headers - headers [array] - List of header objects.queryString - queryString [array] - List of param name/values parsed
          from a query string.postData - postData [object, optional] - Posted data info.headersSize - headersSize [number] - Total number of bytes from the
          start of the HTTP request message until (and including) the double
          CRLF before the body. Set to -1 if the info is not available.bodySize - bodySize [number] - Size of the request body (POST data
          payload) in bytes. Set to -1 if the info is not available.comment - comment [string, optional] (new in 1.2) - A comment provided
          by the user or the application.public HarRequest(java.lang.String method,
          java.lang.String url,
          java.lang.String httpVersion,
          HarCookies cookies,
          HarHeaders headers,
          HarQueryString queryString,
          long headersSize,
          long bodySize)
HarRequest object with all mandatory parametersmethod - method [string] - Request method (GET, POST, ...).url - url [string] - Absolute URL of the request (fragments are not
          included).httpVersion - httpVersion [string] - Request HTTP Version.cookies - cookies [array] - List of cookie objects.headers - headers [array] - List of header objects.queryString - queryString [array] - List of param name/values parsed
          from a query string.headersSize - headersSize [number] - Total number of bytes from the
          start of the HTTP request message until (and including) the double
          CRLF before the body. Set to -1 if the info is not available.bodySize - bodySize [number] - Size of the request body (POST data
          payload) in bytes. Set to -1 if the info is not available.public HarRequest(org.codehaus.jackson.JsonParser jp,
          java.util.List<HarWarning> warnings)
           throws org.codehaus.jackson.JsonParseException,
                  java.io.IOException
HarRequest object from a JsonParser already
 positioned at the beginning of the element contentjp - a JsonParser already positioned at the beginning of the element
          contentwarnings - null if parser should fail on first error, pointer to
          warning list if warnings can be issued for missing fieldsorg.codehaus.jackson.JsonParseExceptionjava.io.IOExceptionpublic HarRequest(HarDatabaseConfig config, long entryId) throws java.sql.SQLException
HarRequest object from a database. Retrieves the
 HarRequest objects that corresponds to the specified entry id.config - the database configuration to useentryId - the entry id to readjava.sql.SQLException - if a database error occurspublic void writeHar(org.codehaus.jackson.JsonGenerator g)
              throws org.codehaus.jackson.JsonGenerationException,
                     java.io.IOException
g - a JsonGeneratorjava.io.IOException - if an IO error occursorg.codehaus.jackson.JsonGenerationException - if the generator failsHarFileWriter.writeHarFile(HarLog, java.io.File)public void writeJDBC(long entryId,
             HarDatabaseConfig config,
             long logId)
               throws java.sql.SQLException
entryId - the entry id this object refers toconfig - the database configuration to usejava.sql.SQLException - if a database error occurspublic void deleteFromJDBC(HarDatabaseConfig config, long logId, boolean dropTables) throws java.sql.SQLException
config - the database configurationlogId - the logId this object refers todropTables - true if tables must be droppedjava.sql.SQLException - if a database access error occurspublic java.lang.String getMethod()
public void setMethod(java.lang.String method)
method - The method to set.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - The url to set.public java.lang.String getHttpVersion()
public void setHttpVersion(java.lang.String httpVersion)
httpVersion - The httpVersion to set.public HarCookies getCookies()
public void setCookies(HarCookies cookies)
cookies - The cookies to set.public HarHeaders getHeaders()
public void setHeaders(HarHeaders headers)
headers - The headers to set.public HarQueryString getQueryString()
public void setQueryString(HarQueryString queryString)
queryString - The queryString to set.public HarPostData getPostData()
public void setPostData(HarPostData postData)
postData - The postData to set.public long getHeadersSize()
public void setHeadersSize(long headersSize)
headersSize - The headersSize to set.public long getBodySize()
public void setBodySize(long bodySize)
bodySize - The bodySize to set.public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - The comment to set.public HarCustomFields getCustomFields()
public void setCustomFields(HarCustomFields customFields)
customFields - The customFields to set.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()Copyright © 2011 Emmanuel Cecchet - University of Massachusetts - All Rights Reserved.