public class HarCookie
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TABLE_NAME
Database table name where the data is stored
|
Constructor and Description |
---|
HarCookie(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
Creates a new
HarCookie object from a JsonParser already
positioned at the beginning of the element content |
HarCookie(java.lang.String name,
java.lang.String value)
Creates a new
HarCookie object with mandatory fields |
HarCookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain,
java.util.Date expires,
boolean httpOnly,
boolean secure,
java.lang.String comment)
Creates a new
HarCookie object |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComment()
Returns the comment value.
|
HarCustomFields |
getCustomFields()
Returns the customFields value.
|
java.lang.String |
getDomain()
Returns the domain value.
|
java.util.Date |
getExpires()
Returns the expires value.
|
java.lang.String |
getMaxAge()
Returns the maxAge value.
|
java.lang.String |
getName()
Returns the name value.
|
java.lang.String |
getPath()
Returns the path value.
|
java.lang.String |
getValue()
Returns the value value.
|
java.lang.String |
getVersion()
Returns the version value.
|
boolean |
isHttpOnly()
Returns the httpOnly value.
|
boolean |
isSecure()
Returns the secure value.
|
void |
setComment(java.lang.String comment)
Sets the comment value.
|
void |
setCustomFields(HarCustomFields customFields)
Sets the customFields value.
|
void |
setDomain(java.lang.String domain)
Sets the domain value.
|
void |
setExpires(java.util.Date expires)
Sets the expires value.
|
void |
setHttpOnly(boolean httpOnly)
Sets the httpOnly value.
|
void |
setMaxAge(java.lang.String maxAge)
Sets the maxAge value.
|
void |
setName(java.lang.String name)
Sets the name value.
|
void |
setPath(java.lang.String path)
Sets the path value.
|
void |
setSecure(boolean secure)
Sets the secure value.
|
void |
setValue(java.lang.String value)
Sets the value value.
|
void |
setVersion(java.lang.String version)
Sets the version value.
|
java.lang.String |
toString() |
void |
writeHar(org.codehaus.jackson.JsonGenerator g)
Write this object on a JsonGenerator stream
|
void |
writeJDBC(HarDatabaseConfig config,
long logId,
long requestId,
java.sql.PreparedStatement cookiePs,
boolean isRequest)
Write this object in the given database referencing the specified logId.
|
public static java.lang.String TABLE_NAME
public HarCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, java.util.Date expires, boolean httpOnly, boolean secure, java.lang.String comment)
HarCookie
objectname
- name [string] - The name of the cookie.value
- value [string] - The cookie value.path
- path [string, optional] - The path pertaining to the cookie.domain
- domain [string, optional] - The host of the cookie.expires
- expires [string, optional] - Cookie expiration time. (ISO
8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g.
2009-07-24T19:20:30.123+02:00).httpOnly
- httpOnly [boolean, optional] - Set to true if the cookie is
HTTP only, false otherwise.secure
- secure [boolean, optional] (new in 1.2) - True if the cookie
was transmitted over ssl, false otherwise.comment
- comment [string, optional] (new in 1.2) - A comment provided
by the user or the application.public HarCookie(java.lang.String name, java.lang.String value)
HarCookie
object with mandatory fieldsname
- name [string] - The name of the cookie.value
- value [string] - The cookie value.public HarCookie(org.codehaus.jackson.JsonParser jp, java.util.List<HarWarning> warnings) throws org.codehaus.jackson.JsonParseException, java.io.IOException
HarCookie
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.JsonParseException
java.io.IOException
public 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(HarDatabaseConfig config, long logId, long requestId, java.sql.PreparedStatement cookiePs, boolean isRequest) throws java.sql.SQLException
requestId
- the requestId this object refers tocookiePs
- PreparedStatement to write cookie dataisRequest
- true if these cookies belong to a request, false if they
belong to a responsejava.sql.SQLException
- if a database access error occurspublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The value to set.public java.lang.String getPath()
public void setPath(java.lang.String path)
path
- The path to set.public java.lang.String getDomain()
public void setDomain(java.lang.String domain)
domain
- The domain to set.public java.util.Date getExpires()
public void setExpires(java.util.Date expires)
expires
- The expires to set.public boolean isHttpOnly()
public void setHttpOnly(boolean httpOnly)
httpOnly
- The httpOnly to set.public boolean isSecure()
public void setSecure(boolean secure)
secure
- The secure to set.public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment to set.public java.lang.String getMaxAge()
public void setMaxAge(java.lang.String maxAge)
maxAge
- The maxAge to set.public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- The version 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.Object
Object.toString()
Copyright © 2011 Emmanuel Cecchet - University of Massachusetts - All Rights Reserved.