public interface INetworkClient
Modifier and Type | Method and Description |
---|---|
void |
cancelAllActiveRequests()
Cancels all active requests this client has running.
|
void |
shutdown()
Shuts down this
INetworkClient . |
void |
shutdownNow()
Shuts down this
INetworkClient immediately, forcefully closing even preexisting calls. |
void cancelAllActiveRequests()
void shutdown()
INetworkClient
. All active requests are cancelled, and the underlying
channel is shutdown cleanly (requests in progress will finish, but no new ones will be
accepted).
Note that any streaming requests may continue indefinitely.void shutdownNow()
INetworkClient
immediately, forcefully closing even preexisting calls.
This is the preferred method to call when using INetworkClient
from an Android activity
or service that is finishing, because it should guarantee that no further callbacks will be
invoked.