| java.lang.Object | |
| ↳ | org.ocast.discovery.DiscoveryReliability |
Defines a level a reliability for the discovery process It is based on two factors: the timeout of a discovery request and the number of attempts before considering a device has been lost.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static final DiscoveryReliability | HIGH | defines a discovery request to be sent every 3 seconds, consider a device lost if it didn't respond 2 consecutive times. | |||||||||
| public static final DiscoveryReliability | LOW | defines a discovery request to be sent every 10 seconds, consider a device lost if it didn't respond 5 consecutive times. | |||||||||
| public static final DiscoveryReliability | MEDIUM | defines a discovery request to be sent every 6 seconds, consider a device lost if it didn't respond 3 consecutive times. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
DiscoveryReliability(int timeout, int retry)
Constructs an object and initializes it with the provided values
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int |
getRetry()
get the retry number before considering a device got lost
| ||||||||||
| int |
getTimeout()
get the discovery timeout to consider no device responded
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
defines a discovery request to be sent every 3 seconds, consider a device lost if it didn't respond 2 consecutive times.
defines a discovery request to be sent every 10 seconds, consider a device lost if it didn't respond 5 consecutive times.
defines a discovery request to be sent every 6 seconds, consider a device lost if it didn't respond 3 consecutive times.
Constructs an object and initializes it with the provided values
| timeout | timeout for a discovery request (seconds) |
|---|---|
| retry | number of attempts before considering a device has been lost |
get the retry number before considering a device got lost
get the discovery timeout to consider no device responded