|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.supermap.data.CloudLicense
public class CloudLicense
云许可管理类型,用于登录和退出。该类位于com.supermap.data.cloudlicense.jar中。
// 以下测试需要在本机没有其他正式许可的情况下进行。 CloudLicenseError.addCloudLicenseErrorOccurredListener(new CloudLicenseErrorOccurredListener() { public void cloudLicenseErrorOccurred(String msg) { System.out.println(msg); } }); String user = "test@supermap.com"; String password = "test"; // 传入用户名和密码,登录云许可,自动检索可用许可 CloudLicense.login(user, password); // 连接云许可中的许可模块,验证是否云许可获取是否成功,成功返回0 License license = new License(); int code = license.connect(1); System.out.println(code); // 退出云许可 CloudLicense.logout(user, password); // 再次连接许可模块,验证云许可是否已经无效,返回值应该为非0值 code = license.connect(1); System.out.println(code);
构造方法摘要 | |
---|---|
CloudLicense()
|
方法摘要 | |
---|---|
static boolean |
login(java.lang.String user,
java.lang.String password)
使用用户名和密码登录SuperMap Online许可服务,获取可用的许可到本地。 |
static boolean |
login(java.lang.String user,
java.lang.String password,
boolean isTrialOnly)
登录SuperMap Online许可服务,获取可用的许可到本地。 |
static boolean |
logout(java.lang.String user,
java.lang.String password)
从SuperMap Online许可服务中退出。 |
static void |
setAutoUpdateInterval(long milliseconds)
设置许可自动更新的时间间隔。 |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public CloudLicense()
方法详细信息 |
---|
public static void setAutoUpdateInterval(long milliseconds)
milliseconds
- 指定自动更新间隔的时间,单位为:毫秒。public static boolean login(java.lang.String user, java.lang.String password)
user
- 用户邮箱。password
- 用户密码。
public static boolean login(java.lang.String user, java.lang.String password, boolean isTrialOnly)
user
- 用户邮箱。password
- 用户密码。isTrialOnly
- 是否只获取试用许可,true表示只获取试用许可。
public static boolean logout(java.lang.String user, java.lang.String password)
如果登录后程序意外终止,可以直接调用Logout方法退出许可服务。
user
- 用户邮箱。password
- 用户密码。
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |