Inheritance diagram for Requester::Requester:

Public Class Methods | |
| new () | |
| create a requester. | |
Public Object Methods | |
| void | register (list domains) |
| Register a requester for one or multiple domains. | |
| hashref | request (hashref env, scalar domain, arrayref variables) |
| Computes (or requests) the values of the variables listed in variables. | |
| boolean | fail_novar (boolean fail) |
| Not used any more? | |
| hashref | getinfo (arrayref gets, arrayref indexes) |
| Called by the default request() method with gets set to the list of the variables, indexes set to the list of variable indexes to be retrieved. | |
| hashref | getwalk (arrayref gets, arrayref indexes, arrayref walks) |
| Similiar to getinfo(), but getwalk() is called by the default request() method if the request includes a "walk" and passes the list of variables to be walked via the walks parameter. | |
| boolean | available (hashref env) |
| Determine if a requester is willing to perform (handle requests) for a given tester environment. | |
| boolean | command_available (list cmd) |
| Tests if cmd is runnable - usually called by classes inherited from Requester::Requester in their available() method in order to find out if a system command they require is present or not. | |
| int | criticalness (int criticalness) |
| Get/Set the criticalness of a handler. | |
| int | consumes (int consumes) |
| Get/set consume level of a handler. | |
Public Functions | |
| list | probe_consumes (hashref env, arrayref variables) |
| Given a list of variable names and an environment, probe_consumes() will try to determine the criticalness/consumes values for the requests that it takes to get all those variable's values. | |
| hashref | get (hashref env, arrayref variables) |
| Given a list of variable names and a tester environment requests all the variables and returns the result in a hash ref. | |
| Requester::Requester | get_handler (scalar domain) |
| Given the name of a domain this function searches for a request handler that is willing to perform requests for this domain. | |
| boolean | load_module (scalar module) |
| Given the name of a module tries to dynamically load Requester::modulename. | |
Protected Functions | |
| protected void | preexit () |
| This function is called during program shutdown. | |
| protected hashref | _get (hashref env, arrayref variables, scalar probe_only) |
| Implements both the get() and probe_consumes() call. | |
| protected void | set_cache (hashref env, scalar domain, scalar name, hashref value) |
| Given a domain, variable name and a value stores the value in the cache under the given domain/name. | |
| protected void | clear_cache () |
| Clear the variable cache. | |
|
||||||||||||||||
|
Implements both the get() and probe_consumes() call.
|
|
|
Determine if a requester is willing to perform (handle requests) for a given tester environment. Usually, available() will return false if some required system command is not installed, some API is missing, the test works only against a local machine but the target host is not the local machine, etc.
|
|
|
Clear the variable cache.
|
|
|
Tests if cmd is runnable - usually called by classes inherited from Requester::Requester in their available() method in order to find out if a system command they require is present or not.
|
|
|
Get/set consume level of a handler. The higher the "consumes" figure is the more other handlers will suffer if running in parallel with this handler.
|
|
|
Get/Set the criticalness of a handler. The higher the criticalness the more the handler will suffer from other handlers to be running in parallel.
|
|
|
Not used any more?
|
|
||||||||||||
|
Given a list of variable names and a tester environment requests all the variables and returns the result in a hash ref.
|
|
|
Given the name of a domain this function searches for a request handler that is willing to perform requests for this domain. If no handler has been registered yet, it tries to dynamically load one via load_module().
|
|
||||||||||||
|
Called by the default request() method with gets set to the list of the variables, indexes set to the list of variable indexes to be retrieved. If gets or indexes are undefined, this means that a 'walk' through all the possible variables has to be performed. The default behaviour is to call the getwalk() method with an empty walks list. So, a requester implementation has to implement at least one of request(), getinfo() or getwalk() in order to do something useful.
Reimplemented in Requester::expedap, and Requester::SlowRequester. |
|
||||||||||||||||
|
Similiar to getinfo(), but getwalk() is called by the default request() method if the request includes a "walk" and passes the list of variables to be walked via the walks parameter. The default behaviour of getwalk() is to just call getinfo() with gets/indexes unset. This has been the default behaviour before getwalk() has been introduced, so getwalk() behaves the same in order to avoid breaking existing requesters. A requester implementation has to implement at least one of request(), getinfo() or getwalk() in order to do something useful.
Reimplemented in Requester::expedap. |
|
|
Given the name of a module tries to dynamically load Requester::modulename.
|
|
|
create a requester.
Reimplemented in Requester::expedap. |
|
|
This function is called during program shutdown.
|
|
||||||||||||
|
Given a list of variable names and an environment, probe_consumes() will try to determine the criticalness/consumes values for the requests that it takes to get all those variable's values.
|
|
|
Register a requester for one or multiple domains. Each Requester has to register itself under a unique domain name. Typically, a requester will create an instance of itself on load (a singleton) and register this instance via register(). This instance will then get "get" requests for the registered domains.
|
|
||||||||||||||||
|
Computes (or requests) the values of the variables listed in variables. The default request() method will process the list of variables and then call getwalk() if the request includes a walk, getinfo() otherwise.
|
|
||||||||||||||||||||
|
Given a domain, variable name and a value stores the value in the cache under the given domain/name.
|
1.4.5