Interface MessageBuilder

  • All Known Implementing Classes:
    BasicMessageBuilder

    public interface MessageBuilder
    A message builder builds simple messages based on integer IDs to avoid using Strings.
    • Method Detail

      • buildMessage

        String buildMessage​(char level,
                            String category,
                            int id)
        Builds a message.
        Parameters:
        level - the level of the message.
        category - the category of the message.
        id - the ID of the message.
        Returns:
        a message.
        Throws:
        NullPointerException - if the given category is null.
      • buildMessage

        String buildMessage​(char level,
                            String category,
                            int id,
                            Throwable t)
        Builds a message with a throwable.
        Parameters:
        level - the level of the message.
        category - the category of the message.
        id - the ID of the message.
        t - the throwable.
        Returns:
        a message.
        Throws:
        NullPointerException - if the given category is null.
      • buildMessage

        String buildMessage​(char level,
                            String category,
                            int id,
                            Object... arguments)
        Builds a message with arguments.
        Parameters:
        level - the level of the message.
        category - the category of the message.
        id - the ID of the message.
        arguments - the arguments.
        Returns:
        a message.
        Throws:
        NullPointerException - if the given category is null.
      • buildMessage

        String buildMessage​(char level,
                            String category,
                            int id,
                            Throwable t,
                            Object... arguments)
        Builds a message with a throwable and arguments.
        Parameters:
        level - the level of the message.
        category - the category of the message.
        id - the ID of the message.
        t - the throwable.
        arguments - the arguments.
        Returns:
        a message.
        Throws:
        NullPointerException - if the given category is null.