Command registry

The ClientCommandRegistry is responsible for knowing what kind of commands are available for the client. It works together with the clacks.common.components.registry.PluginRegistry and inspects all loaded plugins for methods marked with the clacks.common.components.command.Command() decorator. All available information like method path, command name, documentation and signature are recorded and are available for users via the clacks.agent.plugins.goto.client_service.ClientService.clientDispatch() method (or better with the several proxies) and the CLI.

class clacks.client.command.ClientCommandRegistry

This class covers the registration and invocation of methods imported thru plugins.

dispatch(func, *arg, **larg)

The dispatch method will try to call the specified function and checks for user and queue. Additionally, it carries the call to it’s really destination (function types, cumulative results) and does some sanity checks.

Handlers like JSONRPC or AMQP should use this function to dispatch the real calls.

Parameter Description
func method to call
args ordinary argument list/dict

Return: the real methods result



This method will be exported by the CommandRegistry.

List all available client commands


Converts the call path (class.method) to the method itself

Parameter Description
path method path including the class

Return: the method name