Class Message

java.lang.Object
com.northconcepts.datapipeline.core.Message

public class Message extends Object
A diagnostic message with a severity level, an optional exception or stack trace, and the time and thread it was created on; collected by Messages.
  • Constructor Details

    • Message

      public Message(Message.Level level, String message, Throwable exception)
    • Message

      public Message(Message.Level level, Throwable exception)
      Creates a message that uses the exception's message as its text.
    • Message

      public Message(Message.Level level, String message, boolean recordStackTrace)
      Creates a message without an exception, optionally capturing the caller's current stack trace.
    • Message

      public Message(Message.Level level, String message)
      Creates a message without an exception or stack trace.
  • Method Details

    • getTimestamp

      public Date getTimestamp()
      Returns the time this message was created.
    • getLevel

      public Message.Level getLevel()
    • getThread

      public String getThread()
      Returns the name of the thread that created this message.
    • getMessage

      public String getMessage()
    • getStackTrace

      public Throwable getStackTrace()
      Returns the exception, or the Throwable captured at creation, whose stack trace belongs to this message; null if none.
    • getException

      public Throwable getException()
      Returns the exception attached to this message or null if there is none.
    • toString

      public String toString()
      Overrides:
      toString in class Object