接口 ScriptingService
-
- 所有超级接口:
ScriptingInvocationService
public interface ScriptingService extends ScriptingInvocationService
Vault provides the scripting service to vault owners to register executable script and make invocation as well. The executable script registered by the vault owner mainly serves external users to invoke for executing the preset routine defined in the script.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 java.util.concurrent.CompletableFuture<java.util.List<ScriptContent>>getScripts(java.lang.String name, int skip, int limit)Get all registered scripts.java.util.concurrent.CompletableFuture<java.lang.Void>registerScript(java.lang.String name, Condition condition, Executable executable)java.util.concurrent.CompletableFuture<java.lang.Void>registerScript(java.lang.String name, Condition condition, Executable executable, boolean allowAnonymousUser, boolean allowAnonymousApp)Let the vault owner register a script on his vault for a given application.java.util.concurrent.CompletableFuture<java.lang.Void>registerScript(java.lang.String name, Executable executable)java.util.concurrent.CompletableFuture<java.lang.Void>registerScript(java.lang.String name, Executable executable, boolean allowAnonymousUser, boolean allowAnonymousApp)Lets the vault owner register a script on his vault for a given application.java.util.concurrent.CompletableFuture<java.lang.Void>unregisterScript(java.lang.String name)Let the vault owner unregister a script when the script become useless to applications.-
从接口继承的方法 org.elastos.hive.service.ScriptingInvocationService
callScript, downloadFile, downloadFileByHiveUrl, uploadFile
-
-
-
-
方法详细资料
-
registerScript
java.util.concurrent.CompletableFuture<java.lang.Void> registerScript(java.lang.String name, Executable executable)
-
registerScript
java.util.concurrent.CompletableFuture<java.lang.Void> registerScript(java.lang.String name, Condition condition, Executable executable)
-
registerScript
java.util.concurrent.CompletableFuture<java.lang.Void> registerScript(java.lang.String name, Executable executable, boolean allowAnonymousUser, boolean allowAnonymousApp)Lets the vault owner register a script on his vault for a given application. The script is built on the client-side, then serialized and stored on the vault service. Later on, the vault owner or external users can invoke the script to execute one of those scripts and get results or data.- 参数:
name- the name of script to registerexecutable- the executable body of the script with preset routinesallowAnonymousUser- whether allows anonymous user.allowAnonymousApp- whether allows anonymous application.- 返回:
- Void
-
registerScript
java.util.concurrent.CompletableFuture<java.lang.Void> registerScript(java.lang.String name, Condition condition, Executable executable, boolean allowAnonymousUser, boolean allowAnonymousApp)Let the vault owner register a script on his vault for a given application.- 参数:
name- the name of script to registercondition- the condition on which the script could be executed.executable- the executable body of the script with preset routinesallowAnonymousUser- whether allows anonymous user.allowAnonymousApp- whether allows anonymous application.- 返回:
- Void
-
getScripts
java.util.concurrent.CompletableFuture<java.util.List<ScriptContent>> getScripts(java.lang.String name, int skip, int limit)
Get all registered scripts.- 参数:
name- the specific script name, default nullskip- skip, default 0limit- limit, default 0- 返回:
- the list of scripts
-
unregisterScript
java.util.concurrent.CompletableFuture<java.lang.Void> unregisterScript(java.lang.String name)
Let the vault owner unregister a script when the script become useless to applications.- 参数:
name- the name of script to unregister.- 返回:
- void
-
-