public class StateDuration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
long |
idleDurationMs
Idle duration in Milliseconds
|
HttpSender.CnxState |
state |
Constructor and Description |
---|
StateDuration(HttpSender.CnxState state,
long idleDurationMs) |
Modifier and Type | Method and Description |
---|---|
static long |
differenceMs(com.google.common.base.Stopwatch elapsed,
long timeout,
java.util.concurrent.TimeUnit timeoutUnit) |
java.lang.String |
toString() |
public final HttpSender.CnxState state
public final long idleDurationMs
public StateDuration(HttpSender.CnxState state, long idleDurationMs)
state
- State of the HTTP connectionidleDuration
- milliseconds elapsed since the last time the duration was activepublic static long differenceMs(com.google.common.base.Stopwatch elapsed, long timeout, java.util.concurrent.TimeUnit timeoutUnit)
elapsed
- Stopwatch started at the beginning ogf the eventtimeout
- The timeout above which the returned value becomes negativetimeoutUnit
- the unit of the timeoutpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2021 Dassault Systèmes, All Rights Reserved.