Package ai.preferred.venom.request
Class HttpFetcherRequest.Diagnostics
- java.lang.Object
-
- ai.preferred.venom.request.HttpFetcherRequest.Diagnostics
-
- Enclosing class:
- HttpFetcherRequest
public static final class HttpFetcherRequest.Diagnostics extends Object
This class contains the diagnostic information for this request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetAcknowledge()Get the acknowledge time of the request.LonggetComplete()Get the complete time of the request.LonggetLatency()Get the latency between sending of the request and the first response.IntegergetSize()Get the size the response.DoublegetSpeed()Get download speed in bytes per second.LonggetStart()Get the start time of the request.booleanisAcknowledged()Check if request has been started and acknowledged.booleanisCompleted()Check if request has been started, acknowledged and completed.booleanisStarted()Check if request has been started.voidsetAcknowledge()Set the acknowledge time to current nano time.voidsetComplete()Set the complete time to current nano time.voidsetSize(int size)Set the size of the response in bytes.voidsetStart()Set the start time to current nano time.
-
-
-
Method Detail
-
setStart
public void setStart()
Set the start time to current nano time.
-
setAcknowledge
public void setAcknowledge()
Set the acknowledge time to current nano time.
-
setComplete
public void setComplete()
Set the complete time to current nano time.
-
getStart
@Nullable public Long getStart()
Get the start time of the request. Returns null if the start time has not been set.- Returns:
- Time started
-
getAcknowledge
@Nullable public Long getAcknowledge()
Get the acknowledge time of the request. Returns null if the acknowledge time has not been set.- Returns:
- Time acknowledged
-
getComplete
@Nullable public Long getComplete()
Get the complete time of the request. Returns null if the complete time has not been set.- Returns:
- Time completed
-
getSize
@Nullable public Integer getSize()
Get the size the response. Returns null if the response size has not been set.- Returns:
- Response size
-
setSize
public void setSize(int size)
Set the size of the response in bytes.- Parameters:
size- Size of the response.
-
getLatency
@Nullable public Long getLatency()
Get the latency between sending of the request and the first response. Returns null ifisAcknowledged()is false.- Returns:
- Time acknowledged
-
getSpeed
@Nullable public Double getSpeed()
Get download speed in bytes per second. Returns null ifisCompleted()is false.- Returns:
- Download speed
-
isStarted
public boolean isStarted()
Check if request has been started.- Returns:
- True if request is started
-
isAcknowledged
public boolean isAcknowledged()
Check if request has been started and acknowledged.- Returns:
- True if request is started and acknowledged
-
isCompleted
public boolean isCompleted()
Check if request has been started, acknowledged and completed.- Returns:
- True if request is started, acknowledged and completed
-
-