Package org.syncany.operations
Class Operation
- java.lang.Object
-
- org.syncany.operations.Operation
-
- Direct Known Subclasses:
AbstractInitOperation,AbstractTransferOperation,ApplyChangesOperation,DaemonOperation,LogOperation,LsOperation,LsRemoteOperation,PluginOperation,StatusOperation,UpdateOperation,WatchOperation
public abstract class Operation extends java.lang.Object
Operations represent and implement Syncany's business logic. They typically correspond to a command or an action initiated by either a user, or by a periodic action.Each operation might be configured using an operation-specific implementation of the
OperationOptionsinterface and is run using theexecute()method. While the input options are optional, it must return a correspondingOperationResultobject.- See Also:
OperationOptions,OperationResult
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract OperationResultexecute()Executes the operation synchronously and returns a result when the operation exits.
-
-
-
Method Detail
-
execute
public abstract OperationResult execute() throws java.lang.Exception
Executes the operation synchronously and returns a result when the operation exits. Using covariance is recommend, that is OperationFoo should override execute so as to return a OperationFooResult rather than OperationResult.- Returns:
- Returns an operation-specific operation result
- Throws:
java.lang.Exception- If the operation fails
-
-