nvflare.fuel.hci.server.reg module

class CommandFilter[source]

Bases: object

Base class for filters to run before or after commands.

close()[source]
post_command(conn: Connection, args: List[str]) bool[source]

Code to execute after executing a command.

pre_command(conn: Connection, args: List[str]) bool[source]

Code to execute before executing a command.

Returns: True to continue filter chain or False to not

class ServerCommandRegister(app_ctx)[source]

Bases: CommandRegister

Runs filters and executes commands by calling their handler function.

This is the main command register used by AdminServer.

Parameters:

app_ctx – app context

add_filter(cmd_filter: CommandFilter)[source]
close()[source]
process_command(conn: Connection, command: str)[source]