Package org.syncany.operations.daemon
Class DaemonOperation
- java.lang.Object
-
- org.syncany.operations.Operation
-
- org.syncany.operations.daemon.DaemonOperation
-
public class DaemonOperation extends Operation
This operation is the central part of the daemon. It can manage many differentWatchOperations and exposes a web socket server to control and query the daemon. It furthermore offers a file-based control server to stop and reload the daemon.When started via
execute(), the operation starts the following core components:- The
WatchServerstarts aWatchOperationfor every folder registered in thedaemon.xmlfile. It can be reloaded via thesyd reloadcommand. - The
WebServerstarts a websocket and allows clients (e.g. GUI, Web) to control the daemon (if authenticated). TODO [medium] This is not yet implemented! - The
ControlServercreates and watches the daemon control file which allows thesydshell/batch script to write reload/shutdown commands.
- The
-
-
Constructor Summary
Constructors Constructor Description DaemonOperation()DaemonOperation(DaemonOperationOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DaemonOperationResultexecute()Executes the operation synchronously and returns a result when the operation exits.voidonControlCommand(ControlServer.ControlCommand controlCommand)voidonControlManagementRequest(ControlManagementRequest controlRequest)
-
-
-
Field Detail
-
PID_FILE
public static final java.lang.String PID_FILE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DaemonOperation
public DaemonOperation()
-
DaemonOperation
public DaemonOperation(DaemonOperationOptions options)
-
-
Method Detail
-
execute
public DaemonOperationResult execute() throws java.lang.Exception
Description copied from class:OperationExecutes 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.
-
onControlCommand
public void onControlCommand(ControlServer.ControlCommand controlCommand)
-
onControlManagementRequest
public void onControlManagementRequest(ControlManagementRequest controlRequest)
-
-