public interface AppLoader
| 限定符和类型 | 方法和说明 |
|---|---|
void |
forward(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Forward request to inited webapp
|
org.apache.catalina.Context |
getAppContext()
Get webapp loaded Context
|
boolean |
initApp(String userContextPath,
ClassLoader appLoader)
Init Webapp
|
void |
loadCode(String appFilePath)
Load webapp code from specified path
|
void |
loadCodeFromLocalProject(String appFilePath)
Load webapp code from path relative to user project
|
Boolean |
loadCodeFromOSS(String ossEndPoint,
String bucket,
String appName)
Load webapp code from oss
|
void |
setBaseDir(String baseDir)
Set base dir of webapp, the inited webapp will then write to this path.
|
void |
setDownloadPath(String downloadPath)
Set download path, for example if your webapp package from oss.
|
void |
setFCContext(com.aliyun.fc.runtime.Context context)
Set fc execute credential context
|
void |
SetFCContext(String accessKeyId,
String accessKeySecret)
Set fc execute ak sk
|
void setFCContext(com.aliyun.fc.runtime.Context context)
context - Credential contextvoid SetFCContext(String accessKeyId, String accessKeySecret)
accessKeyId - The accessKeyIdaccessKeySecret - The accessKeySecretorg.apache.catalina.Context getAppContext()
void setDownloadPath(String downloadPath)
downloadPath - The path to download webappvoid setBaseDir(String baseDir)
baseDir - The path of webapp homevoid loadCode(String appFilePath)
appFilePath - The path of app packagevoid loadCodeFromLocalProject(String appFilePath)
appFilePath - The path of app packageBoolean loadCodeFromOSS(String ossEndPoint, String bucket, String appName)
ossEndPoint - oss endpointbucket - oss bucketappName - oss keyboolean initApp(String userContextPath, ClassLoader appLoader)
userContextPath - Web context path:
1. For non custom domain http trigger, something like 2016-08-15/proxy/${serviceName}/${functionName}
2. For custom domain http trigger, according your path mapping settings.appLoader - Loader for WebApp contextCopyright © 2019. All Rights Reserved.