Class TraceItem

java.lang.Object
com.gargoylesoftware.base.trace.TraceItem
All Implemented Interfaces:
Cloneable

public class TraceItem extends Object implements Cloneable
An item of data to be written.
Version:
$Revision: 1.4 $
  • Field Details

  • Constructor Details

    • TraceItem

      public TraceItem()
      Create a new item.
  • Method Details

    • clear

      void clear()
      Reset all the values to null
    • isClear

      boolean isClear()
      Returns:
      true if the message has no content
    • toString

      public String toString()
      Return a string representation of this object for testing purposes.
      Overrides:
      toString in class Object
      Returns:
      The string representation
    • containsText

      public boolean containsText()
      Return true if this item contains any text.
      Returns:
      true if this item contains any text.
    • getMessage

      public String getMessage()
      Return the message.
      Returns:
      the message.
    • setMessage

      void setMessage(String string)
      Parameters:
      string - The message
    • getThrowable

      public Throwable getThrowable()
      Return the throwable.
      Returns:
      the throwable.
    • setThrowable

      void setThrowable(Throwable t)
      Parameters:
      t - The throwable
    • getTime

      public Date getTime()
      Return the time that the item was written to Trace
      Returns:
      the time.
    • setTime

      void setTime(Date time)
      Parameters:
      time - The time
    • getThread

      Thread getThread()
      Returns:
      The thread
    • setThread

      void setThread(Thread thread)
      Parameters:
      thread - The thread
    • getThreadName

      public String getThreadName()
      Return the name of the thread that called Trace.
      Returns:
      the name of the thread.
    • getLock

      public Object getLock()
      Return the lock.
      Returns:
      the lock.
    • setLock

      void setLock(Object lock)
      Parameters:
      lock - The lock
    • getPrevItem

      public TraceItem getPrevItem()
      Return the previous item.
      Returns:
      the previous item.
    • setPrevItem

      void setPrevItem(TraceItem item)
      Parameters:
      item - The previous item
    • getNextItem

      public TraceItem getNextItem()
      Return the next item.
      Returns:
      the next item.
    • setNextItem

      void setNextItem(TraceItem item)
      Parameters:
      item - The next item
    • getChannel

      public TraceChannel getChannel()
      Return the channel.
      Returns:
      the channel.
    • setChannel

      void setChannel(TraceChannel channel)
      Parameters:
      channel - The channel
    • clone

      public Object clone() throws CloneNotSupportedException
      Return a copy of this object.
      Overrides:
      clone in class Object
      Returns:
      A copy.
      Throws:
      CloneNotSupportedException - If this object is not cloneable.
    • assertNotNull

      protected final void assertNotNull(String fieldName, Object fieldValue) throws DetailedNullPointerException
      Verify that the specified value is not null. If it is then throw an exception
      Parameters:
      fieldName - The name of the field to check
      fieldValue - The value of the field to check
      Throws:
      DetailedNullPointerException - If fieldValue is null