public class LeanEngine extends Object
| Constructor and Description |
|---|
LeanEngine() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSessionCookie(EngineSessionCookie sessionCookie)
设置sessionCookie的实例
|
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)
Authenticates this client as belonging to your application.
|
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 将拥有全部权限,不再受到权限的限制
|
static void |
useAVCloudCN() |
static void |
useAVCloudUS() |
public static void initialize(String applicationId, String clientKey, String masterKey)
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.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 getAppEnv()
public static void useAVCloudUS()
public static void useAVCloudCN()
Copyright © 2018. All rights reserved.