All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.symphony.bdk.bot.sdk.command.DefaultCommandHandler Maven / Gradle / Ivy

There is a newer version: 1.3.9
Show newest version
package com.symphony.bdk.bot.sdk.command;

import lombok.Setter;

/**
 * Offers a default response for when bot does not receive a valid command
 *
 * @author Marcus Secato
 *
 */
@Setter
public abstract class DefaultCommandHandler extends CommandHandler {

  private CommandDispatcher commandDispatcher;

  private CommandFilter commandFilter;

  private void register() {
    init();
    commandDispatcher.register(getCommandName(), this);
    commandFilter.setDefaultFilter(getCommandName(), getCommandMatcher());
  }

  private String getCommandName() {
    return this.getClass().getCanonicalName();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy