public class LeanEngine extends Object
Constructor and Description |
---|
LeanEngine() |
Modifier and Type | Method and Description |
---|---|
static void |
addSessionCookie(EngineSessionCookie sessionCookie)
设置sessionCookie的实例
|
static String |
getAndroidKey() |
static String |
getAppEnv() |
static String |
getAppId() |
static String |
getAppKey() |
static String |
getMasterKey() |
protected static Set<String> |
getMetaData() |
static EngineSessionCookie |
getSessionCookie() |
static String |
hmacSha1(String value,
String key) |
static void |
initialize(String applicationId,
String clientKey,
String masterKey,
String hookKey)
Authenticates this client as belonging to your application.
|
protected static void |
initialize(String applicationId,
String clientKey,
String masterKey,
String hookKey,
String androidxKey) |
static void |
initializeWithServerUrl(String applicationId,
String clientKey,
String masterKey,
String hookKey,
String serverUrl) |
protected static void |
initializeWithServerUrl(String applicationId,
String clientKey,
String masterKey,
String hookKey,
String androidxKey,
String serverUrl) |
static void |
register(Class<?> clazz)
请在ServletContextListener.contextInitialized中注册所有的云函数定义类
|
static void |
setHttpsRedirectEnabled(boolean enabled)
设置是否打开 HTTPS 自动跳转
|
static void |
setLocalEngineCallEnabled(boolean enabled)
本方法用于本地调试期间,设置为 true 后所有的云函数调用都直接调用本地而非 LeanCloud 上已经部署的项目
|
static void |
setUseMasterKey(boolean useMasterKey)
设置在与 LeanCloud 服务器进行沟通的时候是否使用 masterKey
使用 masterKey 时, API 将拥有全部权限,不再受到权限的限制
|
public static void initialize(String applicationId, String clientKey, String masterKey, String hookKey)
Authenticates this client as belonging to your application. This must be called before your application can use the AVOSCloud library. The recommended way is to put a call to LeanEngine.initialize in each of your onCreate methods.
applicationId
- The application id provided in the AVOSCloud dashboard.clientKey
- The client key provided in the AVOSCloud dashboard.masterKey
- The master key provided in the AVOSCloud dashboard.hookKey
- lean engine hook key.public static void initializeWithServerUrl(String applicationId, String clientKey, String masterKey, String hookKey, String serverUrl)
protected static void initializeWithServerUrl(String applicationId, String clientKey, String masterKey, String hookKey, String androidxKey, String serverUrl)
protected static void initialize(String applicationId, String clientKey, String masterKey, String hookKey, String androidxKey)
public static void register(Class<?> clazz)
clazz
- 需要注册的云函数定义类public static void addSessionCookie(EngineSessionCookie sessionCookie)
sessionCookie
- sessionCookiepublic static EngineSessionCookie getSessionCookie()
public static void setLocalEngineCallEnabled(boolean enabled)
enabled
- true 为调用本地云函数; false 为调用服务端云函数public static void setHttpsRedirectEnabled(boolean enabled)
enabled
- true 为打开 HTTPS 自动跳转public static void setUseMasterKey(boolean useMasterKey)
useMasterKey
- true 为使用 masterKey 发送请求public static String getAppId()
public static String getAppKey()
public static String getMasterKey()
public static String getAndroidKey()
public static String getAppEnv()
Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.