Interface ButtonManager.Handler

All Superinterfaces:
ComponentManager.Handler<ButtonManager.HandlerFunction>
Enclosing class:
ButtonManager

@Immutable public static interface ButtonManager.Handler extends ComponentManager.Handler<ButtonManager.HandlerFunction>
Specification for the handling of a button.
Since:
1.0
  • Method Details

    • group

      @Default default Group group()
      The group that the user must have access to in order to use the button.

      Defaults to everyone (no restriction).

      Returns:
      The group.
    • mutex

      @Default default boolean mutex()
      If true, then this handler will acquire a lock on the source message before executing.

      In other words, for any given message, at any given time, there is at most one handler currently executing that was triggered by a button on that message and have this value as true. If a mutex event occurs on a message while there is already one being handled, it will automatically fail and the user will be informed.

      Defaults to false.

      Returns:
      Whether the handler has mutually-exclusive execution.
    • builder

      Creates a new builder.
      Returns:
      The builder.
    • builder

      Creates a new builder initialized with the properties of the given handler.
      Parameters:
      base - The base instance to copy.
      Returns:
      The builder.