Difference between revisions of "JDaemon"
From Joomla! Documentation
(Layout updates) |
m (preparing for archive only) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | =={{JVer|11.1}} JDaemon== | |
− | + | ===Description=== | |
− | + | ||
− | {{ | + | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
+ | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
− | |[[JDaemon::isActive | + | |public |
+ | |[[API17:JDaemon::isActive|isActive]] | ||
|Check to see if the daemon is active. | |Check to see if the daemon is active. | ||
|- | |- | ||
− | |[[JDaemon::restart | + | |public |
+ | |[[API17:JDaemon::loadConfiguration|loadConfiguration]] | ||
+ | |Load an object or array into the application configuration object. | ||
+ | |- | ||
+ | |public | ||
+ | |[[API17:JDaemon::restart|restart]] | ||
|Restart daemon process. | |Restart daemon process. | ||
|- | |- | ||
− | |[[JDaemon::start | + | |public |
+ | |[[API17:JDaemon::start|start]] | ||
|Spawn daemon process. | |Spawn daemon process. | ||
|- | |- | ||
− | |[[JDaemon::stop | + | |public |
+ | |[[API17:JDaemon::stop|stop]] | ||
|Stop daemon process. | |Stop daemon process. | ||
|- | |- | ||
− | |[[JDaemon::signal | + | |public static |
+ | |[[API17:JDaemon::signal|signal]] | ||
|Method to handle POSIX signals. | |Method to handle POSIX signals. | ||
|- | |- | ||
− | |[[JDaemon::__construct | + | |protected |
+ | |[[API17:JDaemon::__construct|__construct]] | ||
|Class constructor. | |Class constructor. | ||
|- | |- | ||
− | |[[JDaemon::changeIdentity | + | |protected |
+ | |[[API17:JDaemon::changeIdentity|changeIdentity]] | ||
|Method to change the identity of the daemon process and resources. | |Method to change the identity of the daemon process and resources. | ||
|- | |- | ||
− | |[[JDaemon::daemonize | + | |protected |
+ | |[[API17:JDaemon::daemonize|daemonize]] | ||
|Method to put the application into the background. | |Method to put the application into the background. | ||
|- | |- | ||
− | |[[JDaemon::fork | + | |protected |
+ | |[[API17:JDaemon::fork|fork]] | ||
|This is truly where the magic happens. | |This is truly where the magic happens. | ||
|- | |- | ||
− | |[[JDaemon::gc | + | |protected |
+ | |[[API17:JDaemon::gc|gc]] | ||
|Method to perform basic garbage collection and memory management in the sense of clearing the stat cache. | |Method to perform basic garbage collection and memory management in the sense of clearing the stat cache. | ||
|- | |- | ||
− | | | + | |protected |
− | + | |[[API17:JDaemon::setupSignalHandlers|setupSignalHandlers]] | |
− | |||
− | |[[JDaemon::setupSignalHandlers | ||
|Method to attach the signal handler to the known signals. | |Method to attach the signal handler to the known signals. | ||
|- | |- | ||
− | |[[JDaemon::shutdown | + | |protected |
+ | |[[API17:JDaemon::shutdown|shutdown]] | ||
|Method to shut down the daemon and optionally restart it. | |Method to shut down the daemon and optionally restart it. | ||
|- | |- | ||
− | |[[JDaemon::writeProcessIdFile | + | |protected |
+ | |[[API17:JDaemon::writeProcessIdFile|writeProcessIdFile]] | ||
|Method to write the process id file out to disk. | |Method to write the process id file out to disk. | ||
|- | |- | ||
|} | |} | ||
+ | * '''Defined in''' libraries/joomla/application/cli/daemon.php | ||
+ | * '''Extends''' [[API17:JCli|JCli]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.application.cli.daemon' );</source> | <source lang="php">jimport( 'joomla.application.cli.daemon' );</source> | ||
===See also=== | ===See also=== | ||
− | * JDaemon source code | + | * {{JVer|11.1}} '''JDaemon source code''' on [[jplatform:application/cli/daemon.php|BitBucket]] |
− | * [[ | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Application|Application]] |
− | + | * [[API17:JDaemon|Other versions of JDaemon]] | |
− | + | ||
− | + | ||
− | + | ===User contributed notes=== | |
− | ===Examples=== | + | === Code Examples === |
− | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JDaemon | category=JDaemon | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 21:32, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JDaemon[edit]
Description[edit]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | isActive | Check to see if the daemon is active. |
public | loadConfiguration | Load an object or array into the application configuration object. |
public | restart | Restart daemon process. |
public | start | Spawn daemon process. |
public | stop | Stop daemon process. |
public static | signal | Method to handle POSIX signals. |
protected | __construct | Class constructor. |
protected | changeIdentity | Method to change the identity of the daemon process and resources. |
protected | daemonize | Method to put the application into the background. |
protected | fork | This is truly where the magic happens. |
protected | gc | Method to perform basic garbage collection and memory management in the sense of clearing the stat cache. |
protected | setupSignalHandlers | Method to attach the signal handler to the known signals. |
protected | shutdown | Method to shut down the daemon and optionally restart it. |
protected | writeProcessIdFile | Method to write the process id file out to disk. |
- Defined in libraries/joomla/application/cli/daemon.php
- Extends JCli
Importing[edit]
jimport( 'joomla.application.cli.daemon' );
See also[edit]
- JDaemon source code on BitBucket
- Subpackage Application
- Other versions of JDaemon
User contributed notes[edit]
Code Examples[edit]