ClientT
- the specific NetworkClientpublic class ClientBase<ClientT extends INetworkClient> extends Object implements INetworkClient
Modifier and Type | Field and Description |
---|---|
protected ClientT |
client
The NetworkClient
|
Modifier | Constructor and Description |
---|---|
protected |
ClientBase(ClientT client)
Generate new Client
|
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. |
protected final ClientT extends INetworkClient client
protected ClientBase(ClientT client)
public void cancelAllActiveRequests()
INetworkClient
cancelAllActiveRequests
in interface INetworkClient
public void shutdown()
INetworkClient
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.shutdown
in interface INetworkClient
public void shutdownNow()
INetworkClient
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.shutdownNow
in interface INetworkClient