rest resource: add retries and disconnect timer
use jetbrains notnull annotations
forgot return statement :/