|
YAACC - UPNP Client and Server
|
Which failed resolutions are tried again (task 11.6). More...

Public Member Functions | |
| synchronized boolean | shouldRetry (String serviceId, int errorCode) |
| synchronized boolean | takePending (String serviceId) |
| The wait of a retry is over: | |
| synchronized void | lost (String serviceId) |
| The service is gone: a retry that waits for it is dropped and its count starts over. | |
| synchronized void | succeeded (String serviceId) |
| The service was resolved: its next failure starts the count again. | |
| synchronized void | clear () |
| Forgets everything (the discovery stopped). | |
Which failed resolutions are tried again (task 11.6).
NsdManager answers a resolution with FAILURE_ALREADY_ACTIVE when the platform is busy with another one and, on many phones, with FAILURE_INTERNAL_ERROR for a service that resolves a moment later; both are retried, {@value MAX_RETRIES} times at most for one service and after {@value DELAY_MILLIS} ms, so a hostile network that makes every resolution fail causes a bounded number of calls. Every other code is final. The table is bounded: a flood of service names evicts the oldest. Pure and thread safe.
| synchronized boolean de.yaacc.multiroom.discovery.ResolveRetry.shouldRetry | ( | String | serviceId, |
| int | errorCode ) |
| synchronized boolean de.yaacc.multiroom.discovery.ResolveRetry.takePending | ( | String | serviceId | ) |
The wait of a retry is over: