T
- Type of ActionProgress
.R
- Type of result.public interface ServerActionHandle<T extends ActionProgress,R extends Serializable>
ProjectStorage.startExport(de.espirit.firstspirit.access.export.ExportParameters)
and gives access to the progress
of the related
action.Modifier and Type | Method and Description |
---|---|
T |
cancelAction()
Cancel the related server action.
|
void |
checkAndThrow()
Checks, whether an exception occurred during the execution of the related
server action and throws the exception, if found.
|
int |
getActionId()
Returns the unique id of the belonging server action.
|
String |
getActionName()
Returns the name of the belonging server action.
|
T |
getProgress(boolean removeActionIfFinished)
Returns the current action progress of the related server action since
the last progress poll.
|
R |
getResult()
Calls
getResult(false) |
R |
getResult(boolean removeAction)
Blocks until the execution of the related server action has been
finished.
|
boolean |
isRunning()
Indicates wether the related server action is still running, or not.
|
String getActionName()
String
int getActionId()
T getProgress(boolean removeActionIfFinished) throws ServerActionNotFoundException
removeActionIfFinished
- If true
, the action will be
removed, if finished.ServerActionNotFoundException
- if the related server action not
longer exists on the server.void checkAndThrow() throws Exception
Exception
- if an exception occurred during execution of the
related server action.@Nullable R getResult() throws Exception
getResult(false)
Exception
- if the server action throws an exception.@Nullable R getResult(boolean removeAction) throws Exception
true
if you don't want to call getProgress(boolean)
afterwards to ensure action will be removed on server.removeAction
- use true
to remove the belonging server action after this callException
- if the server action throws an exception.T cancelAction() throws ServerActionNotFoundException
ActionProgress
ServerActionNotFoundException
- if the related server action not
longer exists on the server.boolean isRunning() throws ServerActionNotFoundException
true
, if the server action is still running,
false
, otherwiseServerActionNotFoundException
- if the related server action not
longer exists on the server.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408