ePages 6.17.43 - DE_EPAGES/EPagesJ/API/ServiceCheck.pm

Package DE_EPAGES::EPagesJ::API::ServiceCheck

check if ePages J service is up and running with expected version uses the environment variables EPAGESJ_HOST (or 'localhost' if unset) and EPAGESJ_PORT (or '8088' if unset).

Functions

checkEpagesJIsRunning
checkEpagesJVersion
new

checkEpagesJIsRunning

Check if ePages J service is up and running. Uses the environment variables EPAGESJ_HOST (or 'localhost' if unset) and EPAGESJ_PORT (or '8088' if unset).

Syntax
$EpagesJConnection = $ServiceCheck->checkEpagesJVersion($Version);
Input
$hFlags (ref.hash)
flags
  • tries - number of tries for check (default: 3; sleep between checks 10s)

Return
$EpagesJConnection (boolean)
returns true, if ePagesJ connection found

checkEpagesJVersion

Check if ePages J service is up and running with expected version uses the environment variables EPAGESJ_HOST (or 'localhost' if unset) and EPAGESJ_PORT (or '8088' if unset).

Syntax
$IsEqualOrHigher = $ServiceCheckHandler->checkEpagesJVersion($Version);
Input
$Version (string)
required version
$hFlags (ref.hash)
flags
  • tries - number of tries for check (default: 3; sleep between checks 10s)

Return
$IsEqualOrHigher (boolean)
returns true, if reported epagesj version is
at least the required version $Version

new

Creates a new ServiceCheckHandler object, responsible for check if ePages J service is up and running with expected version

Syntax
$ServiceCheckHandler = DE_EPAGES::EPagesJ::API::ServiceCheck->new(
    'verbose' => 0,
);
Input
$hOptions (hash)
keys
  • verbose - print messages on stdout - boolean
  • infoClient - initialized infoclient (optional) - DE_EPAGES::EPagesJ::API::Object::InfoClient</>

Return
$ServiceCheckHandler (object)
ServiceCheckHandler object