CRecordCliRemoveHandler

The message removes a registered handler for a console command.

This message is part of the console API. It is a nanoservice in the SYSTEM namespace.

{
  "id": "aaee82f5-17a1-4925-a0a5-02c1260cb25b",
  "name": "CLI_REMOVE_HANDLER",
  "isService": "true",
  "namespaces": "SYSTEM",
  "description": "Remove a Command Handler.",
  "slots": [
    {
      "key": "1",
      "name": "COMMAND",
      "direction": "REQUEST",
      "mandatory": "true",
      "type": "STRING",
      "description": "The command."
    }
  ]
}

Arguments

  • COMMAND is the registered command for which the handler should be removed. The handler itself is identified by the sender address of the message. The argument is optional: If it is missing, all registered commands of the handler will be removed.

Usage

private void removeCommandLineHandler() throws CException
{
    final CEnvelope env = CEnvelope.forLocalNanoService(CWellKnownNID.SYSTEM);
    final CRecord record = CRecordCliRemoveHandler.create();
    CRecordCliRemoveHandler.setCommand(record,
                                       "quit");
    sendNotification(env,
                     record);
}