use of com.aliyun.mns.client.CloudAccount in project xnx3 by xnx3.
the class MNSUtil method getMNSClient.
/**
* 获取当前对象内的 {@link MNSClient} , 对象内只有第一次获取时会创建,并对象内缓存。以后都会直接拿过来使用,不会第二次创建。
* @return
*/
public MNSClient getMNSClient() {
if (mnsClient == null) {
account = new CloudAccount(this.accessKeyId, this.accessKeySecret, this.endpoint);
// this client need only initialize once
mnsClient = account.getMNSClient();
}
return mnsClient;
}
Aggregations