public class DefaultClient extends Object implements Client
| Constructor and Description |
|---|
DefaultClient(Config config,
Credential credential) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Config |
getConfig() |
Credential |
getCredential() |
Transport |
getTransport() |
Response |
invoke(Request request,
Class<? extends Response> clazz)
invoke api from request and response
|
void |
setConfig(Config config) |
void |
setCredential(Credential credential) |
void |
setTransport(Transport transport) |
void |
useMiddleware(Middleware middleware) |
public DefaultClient(Config config, Credential credential)
public Response invoke(Request request, Class<? extends Response> clazz) throws UCloudException
Clientinvoke in interface Clientrequest - request objectclazz - response classUCloudExceptionpublic void useMiddleware(Middleware middleware)
public void setTransport(Transport transport)
public Transport getTransport()
public Config getConfig()
public void setConfig(Config config)
public Credential getCredential()
public void setCredential(Credential credential)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2024. All rights reserved.