2.4. System Methods

Many XML-RPC servers support a set of de facto methods organized under a system namespace. When Supervisor's main RPC interface is registered, it provides both the supervisor namespace and also a system namespace. The methods available in the system namespace are described in this section.

2.4.1. system.listMethods()

system.listMethods()

Table 2.54. system.listMethods() Parameters

Type Name Description

Table 2.55. system.listMethods() Return Value

Type Description
array Method names

system.listMethods() returns an array containing all of the method names that are available to be called on the Supervisor instance.

2.4.2. system.methodHelp()

system.methodHelp()

Table 2.56. system.methodHelp() Parameters

Type Name Description
string name Name of the method to look up

Table 2.57. system.methodHelp() Return Value

Type Description
string Description of the method's purpose and parameters

system.methodHelp() returns a string describing a given method. This is generated automatically from the inline comments in the Supervisor source code. The output is similar to JavaDoc.

If the given method name is not recognized, the fault SIGNATURE_UNSUPPORTED will be returned.

2.4.3. system.methodSignature()

system.methodSignature()

Table 2.58. system.methodSignature() Parameters

Type Name Description
string name Name of the method to look up

Table 2.59. system.methodSignature() Return Value

Type Description
array An array of strings, each containing the name of an XML-RPC type

system.methodSignature() returns information about a method's return type and the types of any parameters it may receive. The information is returned as an array of strings, where each string contains the name of an XML-RPC type such as integer or boolean.

The first element in the array will be the method's return type. Any successive elements are the types of the method's parameters. If the method has any optional parameters, those types will always be included at the end of the signature array.

If the given method name is not recognized, or the method signature could not be generated for any other reason, the fault SIGNATURE_UNSUPPORTED will be returned.

2.4.4. system.multicall()

system.multicall()

Table 2.60. system.multicall() Parameters

Type Name Description
array calls An array of structs, where each struct represents a method call and its parameters like {'methodName': 'supervisor.startProcess', 'params': ['foo']}

Table 2.61. system.multicall() Return Value

Type Description
array An array where each element contains the return value from a method call. If any method failed, its element will contain a struct like {'faultCode': 10, 'faultName': 'BAD_NAME'}.

Each XML-RPC method call normally requires one roundtrip to Supervisor's HTTP server. When it is necessary to make multiple XML-RPC method calls to a Supervisor instance, it may be possible to boxcar them into a single HTTP request using the system.multicall() method.

system.multicall() takes an array as its only parameter. Each element in the array is a struct representing a single method call. The struct must have a key methodName whose value is a string containing a valid Supervisor XML-RPC method name. The struct must also also have a key params whose value is an array containing the parameters for the method.

Supervisor will attempt to call each method specified with the given parameters. From the client's perspective, the execution order on the server is unspecified. The methods are effectively executed in parallel, i.e. no method in the call can depend on the execution of any other method in the call.

The return value from system.multicall() will be an array. Each element in the array will be the return value from a method call. The order of the array is the same order as the input array.

If any method call executed during a system.multicall returns a fault, its element in the return array will contain a struct with keys faultCode and faultString.