public class HarPageTimings
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 |
---|
HarPageTimings()
Creates a new
HarPageTimings object with default values. |
HarPageTimings(HarDatabaseConfig config,
long pageId)
Creates a new
HarPageTimings object from a database. |
HarPageTimings(org.codehaus.jackson.JsonParser jp,
java.util.List<HarWarning> warnings)
Creates a new
HarPageTimings object from a JsonParser already
positioned at the beginning of the element content |
HarPageTimings(long onContentLoad,
long onLoad,
java.lang.String comment)
Creates a new
HarPageTimings object |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComment()
Returns the comment value.
|
HarCustomFields |
getCustomFields()
Returns the customFields value.
|
long |
getOnContentLoad()
Returns the onContentLoad value.
|
long |
getOnLoad()
Returns the onLoad value.
|
HarTimeStamps |
getTimeStamps()
Returns the timeStamps value.
|
void |
setComment(java.lang.String comment)
Sets the comment value.
|
void |
setCustomFields(HarCustomFields customFields)
Sets the customFields value.
|
void |
setOnContentLoad(long onContentLoad)
Sets the onContentLoad value.
|
void |
setOnLoad(long onLoad)
Sets the onLoad value.
|
void |
setTimeStamps(HarTimeStamps timeStamps)
Sets the timeStamps value.
|
java.lang.String |
toString() |
void |
writeHar(org.codehaus.jackson.JsonGenerator g)
Write this object on a JsonGenerator stream
|
void |
writeJDBC(long pageId,
HarDatabaseConfig config,
java.sql.PreparedStatement timingPs,
long logId)
Write this object in the given database referencing the specified logId.
|
public static java.lang.String TABLE_NAME
public HarPageTimings()
HarPageTimings
object with default values.public HarPageTimings(long onContentLoad, long onLoad, java.lang.String comment)
HarPageTimings
objectonContentLoad
- Content of the page loaded. Number of milliseconds
since page load started (page.startedDateTime). Use -1 if the
timing does not apply to the current request.onLoad
- Page is loaded (onLoad event fired). Number of milliseconds
since page load started (page.startedDateTime). Use -1 if the
timing does not apply to the current request.comment
- A comment provided by the user or the application.public HarPageTimings(org.codehaus.jackson.JsonParser jp, java.util.List<HarWarning> warnings) throws org.codehaus.jackson.JsonParseException, java.io.IOException
HarPageTimings
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 HarPageTimings(HarDatabaseConfig config, long pageId) throws java.sql.SQLException
HarPageTimings
object from a database. Retrieves
the HarPageTimings objects that corresponds to the specified page id.config
- the database configuration to usepageId
- the page id referencedjava.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 pageId, HarDatabaseConfig config, java.sql.PreparedStatement timingPs, long logId) throws java.sql.SQLException
pageId
- the database page id this object refers toconfig
- the database configuration to write totimingPs
- PreparedStatement to write page timings datalogId
- the log entry to updatejava.sql.SQLException
- if a database access error occurspublic long getOnContentLoad()
public void setOnContentLoad(long onContentLoad)
onContentLoad
- The onContentLoad to set.public long getOnLoad()
public void setOnLoad(long onLoad)
onLoad
- The onLoad to set.public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- The comment to set.public HarTimeStamps getTimeStamps()
public void setTimeStamps(HarTimeStamps timeStamps)
timeStamps
- The timeStamps 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.