Class CommandMessageSourceProvider

java.lang.Object
tech.guilhermekaua.spigotboot.commands.message.CommandMessageSourceProvider

public class CommandMessageSourceProvider extends Object
Resolves the active CommandMessageSource from the dependency context, mirroring CommandMessagesProvider: no bean yields a no-op source, one bean wins, several require exactly one @Primary.
  • Constructor Details

    • CommandMessageSourceProvider

      public CommandMessageSourceProvider()
  • Method Details

    • resolve

      public CommandMessageSource resolve(Context context)
      Parameters:
      context - the command context; must not be null
      Returns:
      the resolved source, never null (a no-op source when none is registered)
      Throws:
      NullPointerException - if context is null
      IllegalStateException - when multiple sources exist without exactly one @Primary source