Extract common functionality from Transport and ApplicationWorker.