public class NlsClient extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
DEFAULT_CONNECTION_TIMEOUT
连接建立默认超时时间,单位毫秒
|
| Constructor and Description |
|---|
NlsClient(String token)
传入accessToken,访问阿里云线上服务
|
NlsClient(String url,
String token)
传入accessToken,根据传入url访问指定环境的服务
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
connect(ConnectionListener listener) |
void |
setToken(String token)
更新token.token有有效期,过了有效期需要设置新的token
|
void |
shutdown()
在应用的最后调用此方法,释放资源
|
public NlsClient(String token)
token - public void setToken(String token)
token - public Connection connect(ConnectionListener listener) throws Exception
Exceptionpublic void shutdown()
Copyright © 2018. All rights reserved.