Entry.java
/*
* Copyright 2017 Uwe Plonus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sw4j.tool.har.model;
import com.google.gson.annotations.Expose;
import java.math.BigDecimal;
import java.time.OffsetDateTime;
/**
* <p>
* This is an entry object of the log.
* </p>
* <p>
* This class is not thread safe.
* </p>
*
* @author Uwe Plonus <u.plonus@gmail.com>
*/
public class Entry {
/** The optional pageref of the entry. */
@Expose
private String pageref;
/** The date and time when the request started. */
@Expose
private OffsetDateTime startedDateTime;
/** The elapsed time of the request in milliseconds. */
@Expose
private BigDecimal time;
/** The request of this entry. */
@Expose
private Request request;
/** The default constructor. */
public Entry() { }
/**
* <p>
* Returns the optional pageref of the entry.
* </p>
*
* @return the pageref of the entry.
*/
public String getPageref() {
return pageref;
}
/**
* <p>
* Sets the optional pageref of the entry.
* </p>
*
* @param pageref the pageref of the entry.
*/
public void setPageref(final String pageref) {
this.pageref = pageref;
}
/**
* <p>
* Returns the date and time when the request started.
* </p>
*
* @return the date and time of the request.
*/
public OffsetDateTime getStartedDateTime() {
return startedDateTime;
}
/**
* <p>
* Sets the date and time when the request started.
* </p>
*
* @param startedDateTime the date and time of the request.
*/
public void setStartedDateTime(final OffsetDateTime startedDateTime) {
this.startedDateTime = startedDateTime;
}
/**
* <p>
* Returns the elapsed time of the request in milliseconds.
* </p>
*
* @return the elapsed time in milliseconds.
*/
public BigDecimal getTime() {
return time;
}
/**
* <p>
* Sets the elapsed time of the request in milliseconds.
* </p>
*
* @param time the elapsed time in milliseconds.
*/
public void setTime(final BigDecimal time) {
this.time = time;
}
/**
* <p>
* Returns the request of the entry.
* </p>
*
* @return the request.
*/
public Request getRequest() {
return request;
}
/**
* <p>
* Sets the request of the entry.
* </p>
*
* @param request the request.
*/
public void setRequest(final Request request) {
this.request = request;
}
}