Property | Type | Description | |
---|---|---|---|
$distroMapping | array | The mapping of Linux distributions to their release file's name | |
$name | string | The unique scanner name. | |
$restartCommands | array | Array that contains the available startup scripts. | |
$service | The API service used to load the deployment directory. |
Method | Description | |
---|---|---|
__construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, string $name ) | Constructor sets initialContext object per default and calls init function to pass other args. | |
getName ( ) : string | Returns the unique scanner name. | |
getRestartCommand ( string $os, string | null $distVersion = null ) : string | Returns the restart command for the passed OS if available. | |
getService ( ) : |
Returns The API service, e. g. to load the deployment directory. | |
getSystemLogger ( ) : Psr\Log\LoggerInterface | The system logger to use. | |
init ( ) : void | Initalizes the scanner with the necessary service instance. | |
newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface | (non-PHPdoc) | |
restart ( ) : void | Restart the appserver using the appserverctl file in the sbin folder. | |
stop ( ) : void | Stop's the scanner. |
Method | Description | |
---|---|---|
getDirectoryHash ( SplFileInfo $directory ) : string | Calculates an hash value for all files with certain extensions. | |
getDistributionVersion ( string | null $distribution = null, array $etcList = [] ) : string | boolean | This method will check for the Linux release file normally stored in /etc and will return the version of the distribution | |
getEtcDir ( ) : string | Returns the systems configuration root directory aka "etc" | |
getExtensionsToWatch ( ) : array | Returns an array with file extensions that are used to create the directory hash. | |
getLastFileTouch ( string $file ) : integer | Returns the time when the contents of the file were changed. The time returned is a UNIX timestamp. | |
getLinuxDistribution ( array $etcList = [] ) : string | boolean | This method will check for the Linux release file normally stored in /etc and will return the corresponding distribution |
public __construct ( AppserverIo\Appserver\Application\Interfaces\ContextInterface $initialContext, string $name ) | ||
$initialContext | AppserverIo\Appserver\Application\Interfaces\ContextInterface | The initial context instance |
$name | string | The unique scanner name from the configuration |
protected getDirectoryHash ( SplFileInfo $directory ) : string | ||
$directory | SplFileInfo | The directory to watch |
return | string | The hash value build out of the found filenames |
abstract protected getExtensionsToWatch ( ) : array | ||
return | array | The array with the file extensions |
protected getLastFileTouch ( string $file ) : integer | ||
$file | string | The deployment directory |
return | integer | The UNIX timestamp with the last successfully deployment date or 0 if no successful deployment has been processed |
public getService ( ) : |
||
return | The API service instance |
public getSystemLogger ( ) : Psr\Log\LoggerInterface | ||
return | Psr\Log\LoggerInterface | The system logger instance |
public newService ( string $className ) : AppserverIo\Appserver\Core\Api\ServiceInterface | ||
$className | string | The API service class name to return the instance for |
return | AppserverIo\Appserver\Core\Api\ServiceInterface | The service instance |
protected array $distroMapping | ||
return | array |
protected array $restartCommands | ||
return | array |