Using the Apache NiFi ToolkitPDF version

Adding Commands

To add a NiFi command, create a new class that extends AbstractNiFiCommand:

         public class MyCommand extends AbstractNiFiCommand {

  public MyCommand() {
      super("my-command");
  }

  @Override
  protected void doExecute(NiFiClient client, Properties properties)
          throws NiFiClientException, IOException, MissingOptionException, CommandException {
      // TODO implement
  }

  @Override
  public String getDescription() {
      return "This is my new command";
  }
}
      

Add the new command to NiFiCommandGroup:

         commands.add(new MyCommand());
      

To add a NiFi Registry command, perform the same steps, but extend from AbstractNiFiRegistryCommand, and add the command to NiFiRegistryCommandGroup.

We want your opinion

How can we improve this page?

What kind of feedback do you have?