Class SimpleMessage.Sender<E>

java.lang.Object
eu.bandm.tools.message.SingleSender<SimpleMessage<E>>
eu.bandm.tools.message.SimpleMessage.Sender<E>
Type Parameters:
E - the type of the document identifier of the message locations
Enclosing class:
SimpleMessage<D>

public static class SimpleMessage.Sender<E> extends SingleSender<SimpleMessage<E>>
A convenience class which allows to create and send a message with one single method invocation.

As with every SingleSender, the receiver must be set to a non-null value before the first message is received. Otherwise the code will crash intentionally.

  • Constructor Details

    • Sender

      public Sender(@Opt @Opt MessageReceiver<SimpleMessage<E>> msgr)
      A constructor which sets the receiver of the messages.
      Parameters:
      msgr - the receiver of the messages.
    • Sender

      public Sender()
      A constructor which requires subsequent setting of the receiver.
  • Method Details

    • log

      public void log(String message, Object... args)
      Send a log message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • log

      public void log(Locatable<E> loc, String message, Object... args)
      Send a log message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • log

      public void log(Throwable ex, String message, Object... args)
      Send a log message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • log

      public void log(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a log message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • logStart

      public void logStart(String message, Object... args)
      Send a log start message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • logStart

      public void logStart(Locatable<E> loc, String message, Object... args)
      Send a log start message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • logStart

      public void logStart(Throwable ex, String message, Object... args)
      Send a log start message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • logStart

      public void logStart(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a log start message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • logEnd

      public void logEnd(String message, Object... args)
      Send a log end message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • logEnd

      public void logEnd(Locatable<E> loc, String message, Object... args)
      Send a log end message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • logEnd

      public void logEnd(Throwable ex, String message, Object... args)
      Send a log end message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • logEnd

      public void logEnd(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a log end message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • error

      public void error(String message, Object... args)
      Send an error message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • error

      public void error(Locatable<E> loc, String message, Object... args)
      Send an error message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • error

      public void error(Throwable ex, String message, Object... args)
      Send an error message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • error

      public void error(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send an error message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • warning

      public void warning(String message, Object... args)
      Send a warning message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • warning

      public void warning(Locatable<E> loc, String message, Object... args)
      Send a warning message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • warning

      public void warning(Throwable ex, String message, Object... args)
      Send a warning with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • warning

      public void warning(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a warning message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • failure

      public void failure(String message, Object... args)
      Send a failure message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • failure

      public void failure(Locatable<E> loc, String message, Object... args)
      Send a failure message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • failure

      public void failure(Throwable ex, String message, Object... args)
      Send a failure message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • failure

      public void failure(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a failure message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments
    • hint

      public void hint(String message, Object... args)
      Send a hint message with the given attributes, and set all others to default.
      Parameters:
      message - the message text
      args - the message arguments
    • hint

      public void hint(Locatable<E> loc, String message, Object... args)
      Send a hint message with the given attributes, and set all others to default.
      Parameters:
      loc - the location of the message
      message - the message text
      args - the message arguments
    • hint

      public void hint(Throwable ex, String message, Object... args)
      Send a hint message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      message - the message text
      args - the message arguments
    • hint

      public void hint(Throwable ex, Locatable<E> loc, String message, Object... args)
      Send a hint message with the given attributes, and set all others to default.
      Parameters:
      ex - the cause of the message
      loc - the location of the message
      message - the message text
      args - the message arguments