Skip to content

TCustomDaemon

Base daemon application class.

Declaration

Source position: daemonapp.pp line 48

type

  TCustomDaemon = class(TDataModule)
  public
    procedure CheckControlMessages;
    procedure LogMessage;
    procedure ReportStatus;
    property Definition: TDaemonDef; {r}
    property DaemonThread: TThread; {r}
    property Controller: TDaemonController; {r}
    property Status: TCurrentStatus; {rw}
    property Logger: TEventLog; {r}
  end;

Description

TCustomDaemon implements all the basic calls that are needed for a daemon to function. Descendents of TCustomDaemon can override these calls to implement the daemon-specific behaviour.

TCustomDaemon is an abstract class, it should never be instantiated. Either a descendent of it must be created and instantiated, or a descendent of TDaemon can be designed to implement the behaviour of the daemon.

Properties

Member Visibility Description
Controller read only public TDaemonController instance controlling this daemon instance.
DaemonThread read only public Thread in which daemon is running.
Definition read only public The definition used to instantiate this daemon instance.
Logger read only public TEventLog instance used to send messages to the system log.
Status public Current status of the daemon.
See all Properties

Methods

Member Visibility Description
CheckControlMessages public
LogMessage public Log a message to the system log.
ReportStatus public Report the current status to the operating system.
See all Methods

See also

Name Description
TDaemon Daemon class for visual development.
TDaemonDef Daemon definition.
TDaemonController Internal daemon controller class.
TDaemonApplication Default descendent of CustomDaemonApplication.