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 java.lang.Object
This class contains the diagnostic information for this request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Long
getAcknowledge()
Get the acknowledge time of the request.java.lang.Long
getComplete()
Get the complete time of the request.java.lang.Long
getLatency()
Get the latency between sending of the request and the first response.java.lang.Integer
getSize()
Get the size the response.java.lang.Double
getSpeed()
Get download speed in bytes per second.java.lang.Long
getStart()
Get the start time of the request.boolean
isAcknowledged()
Check if request has been started and acknowledged.boolean
isCompleted()
Check if request has been started, acknowledged and completed.boolean
isStarted()
Check if request has been started.void
setAcknowledge()
Set the acknowledge time to current nano time.void
setComplete()
Set the complete time to current nano time.void
setSize(int size)
Set the size of the response in bytes.void
setStart()
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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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
-
-