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 differentWatchOperation
s 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
WatchServer
starts aWatchOperation
for every folder registered in thedaemon.xml
file. It can be reloaded via thesyd reload
command. - The
WebServer
starts a websocket and allows clients (e.g. GUI, Web) to control the daemon (if authenticated). TODO [medium] This is not yet implemented! - The
ControlServer
creates and watches the daemon control file which allows thesyd
shell/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 DaemonOperationResult
execute()
Executes the operation synchronously and returns a result when the operation exits.void
onControlCommand(ControlServer.ControlCommand controlCommand)
void
onControlManagementRequest(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:Operation
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.
-
onControlCommand
public void onControlCommand(ControlServer.ControlCommand controlCommand)
-
onControlManagementRequest
public void onControlManagementRequest(ControlManagementRequest controlRequest)
-
-