Package com.kii.cloud.storage
Class KiiServerCodeEntry
- java.lang.Object
-
- com.kii.cloud.storage.KiiServerCodeEntry
-
public class KiiServerCodeEntry extends java.lang.Object
Represents a server side code entry in KiiCloud.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KiiServerCodeExecResult
execute(KiiServerCodeEntryArgument argument)
Execute this server code entry and wait for completion.void
execute(KiiServerCodeEntryArgument argument, KiiServerCodeEntryCallback callback)
Execute this server code entry in background.java.lang.String
getEntryName()
Get the entryName of this server code entry.KiiServerCodeEnvironmentVersion
getEnvironmentVersion()
Get the version of Node.js to run.java.lang.String
getVersion()
Get the version of this server code entry.
-
-
-
Method Detail
-
getEnvironmentVersion
@Nullable public KiiServerCodeEnvironmentVersion getEnvironmentVersion()
Get the version of Node.js to run.- Returns:
- environmentVersion
-
getEntryName
@NonNull public java.lang.String getEntryName()
Get the entryName of this server code entry.- Returns:
- entryName.
-
getVersion
@Nullable public java.lang.String getVersion()
Get the version of this server code entry.- Returns:
- version of the entry. null if version is not specified. In this case, entry refers the latest version.
-
execute
@WorkerThread @NonNull public KiiServerCodeExecResult execute(@Nullable KiiServerCodeEntryArgument argument) throws BadRequestException, UnauthorizedException, ForbiddenException, UndefinedException, java.io.IOException, NotFoundException, ConflictException
Execute this server code entry and wait for completion.
NOTE: This api access to server. Should not be executed in UI/Main thread.- Parameters:
argument
- pass to the entry of script in the cloud. If null is specified, no argument pass to the script.- Returns:
- Result of execution includes JSONObject returned from specified server code entry in KiiCloud.
- Throws:
BadRequestException
UnauthorizedException
ForbiddenException
UndefinedException
java.io.IOException
NotFoundException
ConflictException
- See Also:
execute(KiiServerCodeEntryArgument, KiiServerCodeEntryCallback)
-
execute
public void execute(@Nullable KiiServerCodeEntryArgument argument, @Nullable KiiServerCodeEntryCallback callback)
Execute this server code entry in background.
NOTE: This method should be executed in UI thread.- Parameters:
argument
- pass to the entry of script in the cloud. If null is specified, no argument pass to the script.callback
- called on completion of execution.- Throws:
java.lang.IllegalStateException
- Thrown if user is not logged in.- See Also:
execute(KiiServerCodeEntryArgument)
-
-