public class Daemon extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DAEMON_USER_UUID
The uuid defined for the daemon user object
|
| Constructor and Description |
|---|
Daemon() |
| Modifier and Type | Method and Description |
|---|---|
static void |
executeScheduledTask(Task task)
Executes the given task in a new thread that is authenticated as the daemon user.
|
static boolean |
isDaemonThread() |
static Thread |
runInNewDaemonThread(Runnable runnable)
Call this method if you are inside a Daemon thread (for example in a Module activator or a
scheduled task) and you want to start up a new parallel Daemon thread.
|
static Module |
startModule(Module module)
This method should not be called directly.
|
protected static final String DAEMON_USER_UUID
public static Module startModule(Module module) throws ModuleException
ModuleFactory.startModule(Module)
method uses this to start the given module in a new thread that is authenticated as the
daemon usermodule - the module to startModuleExceptionpublic static void executeScheduledTask(Task task) throws Throwable
TimerSchedulerTask during actual task executiontask - the task to runThrowablepublic static Thread runInNewDaemonThread(Runnable runnable)
runnable - what to run in a new threadThreadpublic static boolean isDaemonThread()
Context.hasPrivilege(String)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.