public class VersionManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
VersionManager.CPU_TYPE
CPU类型
|
static interface |
VersionManager.RequestCpuTypeAndFeatureCallback
getCurrentSystemCpuTypeAndFeature()回调接口
|
static interface |
VersionManager.RequestDownloadUrlForCurrentVersionCallback
getCurrentSystemCpuTypeAndFeature()回调接口
|
Modifier and Type | Field and Description |
---|---|
static int |
RET_ERROR_AKSK
无效的ak,sk
|
static int |
RET_ERROR_NETWORK
网络错误
|
static int |
RET_ERROR_NOTFOUND
没有找到当前版本的底层库下载地址
|
static int |
RET_SUCCESS
返回成功
|
Constructor and Description |
---|
VersionManager() |
Modifier and Type | Method and Description |
---|---|
void |
getCurrentSystemCpuTypeAndFeature(int timeout,
java.lang.String ak,
java.lang.String sk,
VersionManager.RequestCpuTypeAndFeatureCallback callback)
获取当前系统CPU架构及特性
|
java.lang.String |
getCurrentVersion()
获取当前jar包的版本号x.x
|
void |
getDownloadUrlForCurrentVersion(int timeout,
VersionManager.CPU_TYPE cpuType,
java.lang.String ak,
java.lang.String sk,
VersionManager.RequestDownloadUrlForCurrentVersionCallback callback)
获取当前版本对应cpu类型的底层库压缩包的下载地址
|
static VersionManager |
getInstance()
获取VersionManager实例
|
public static final int RET_SUCCESS
public static final int RET_ERROR_NETWORK
public static final int RET_ERROR_AKSK
public static final int RET_ERROR_NOTFOUND
public static VersionManager getInstance()
public java.lang.String getCurrentVersion()
public void getCurrentSystemCpuTypeAndFeature(int timeout, java.lang.String ak, java.lang.String sk, VersionManager.RequestCpuTypeAndFeatureCallback callback)
timeout
- 网络超时时间,单位为毫秒,0为不设置超时ak
- aksk
- sk前16位callback
- 请求回调public void getDownloadUrlForCurrentVersion(int timeout, VersionManager.CPU_TYPE cpuType, java.lang.String ak, java.lang.String sk, VersionManager.RequestDownloadUrlForCurrentVersionCallback callback)
timeout
- 网络超时时间,单位为毫秒, 0为不设置超时cpuType
- cpu类型ak
- aksk
- sk前16位callback
- 请求回调