Class LogAlert

java.lang.Object
com.biglybt.core.logging.LogAlert
All Implemented Interfaces:
LogAlert

public class LogAlert extends Object implements LogAlert
  • Field Details

    • AT_INFORMATION

      public static final int AT_INFORMATION
      See Also:
    • AT_WARNING

      public static final int AT_WARNING
      See Also:
    • AT_ERROR

      public static final int AT_ERROR
      See Also:
    • REPEATABLE

      public static final boolean REPEATABLE
      See Also:
    • UNREPEATABLE

      public static final boolean UNREPEATABLE
      See Also:
    • when

      public final long when
    • entryType

      public final int entryType
    • err

      public Throwable err
    • repeatable

      public final boolean repeatable
    • text

      public String text
    • relatedTo

      public Object[] relatedTo
      A list of events that this entry is related to
    • timeoutSecs

      public int timeoutSecs
    • details

      public String details
    • isNative

      public boolean isNative
    • forceNotify

      public boolean forceNotify
  • Constructor Details

    • LogAlert

      public LogAlert(boolean repeatable, int type, String text)
      Parameters:
      repeatable -
      type -
      text -
    • LogAlert

      public LogAlert(boolean repeatable, int type, String text, int timeoutSecs)
      Parameters:
      repeatable -
      type -
      text -
      timeoutSecs - -1 -> use defaults 0 -> no timeout
    • LogAlert

      public LogAlert(Object[] relatedTo, boolean repeatable, int type, String text)
    • LogAlert

      public LogAlert(Object relatedTo, boolean repeatable, int type, String text)
    • LogAlert

      public LogAlert(boolean repeatable, String text, Throwable err)
    • LogAlert

      public LogAlert(boolean repeatable, int type, String text, Throwable err)
    • LogAlert

      public LogAlert(Object relatedTo, boolean repeatable, String text, Throwable err)
      Parameters:
      downloadManagerImpl -
      b -
      string -
      e -
  • Method Details

    • getGivenTimeoutSecs

      public int getGivenTimeoutSecs()
      Description copied from interface: LogAlert
      How long should to display the alert for - this will be the value that was given when creating the alert.
      Specified by:
      getGivenTimeoutSecs in interface LogAlert
      Returns:
      How long to display the timeout for - -1 for no explicit value, 0 to display it indefinitely, otherwise it is the number of seconds to display the value for.
    • getText

      public String getText()
      Description copied from interface: LogAlert
      Returns the text of the message - this may include formatting tags (for example, hyperlinks).
      Specified by:
      getText in interface LogAlert
      Returns:
      The text to display.
    • getError

      public Throwable getError()
      Description copied from interface: LogAlert
      Returns the error associated with the alert - null if there is no error.
      Specified by:
      getError in interface LogAlert
    • getType

      public int getType()
      Description copied from interface: LogAlert
      Returns the log type of the alert - the value of which will be one of the LT_ constants defined above.
      Specified by:
      getType in interface LogAlert
    • getContext

      public Object[] getContext()
      Description copied from interface: LogAlert
      Returns the objects associated with the alert - this will return null if the alert isn't associated with such any objects.
      Specified by:
      getContext in interface LogAlert
    • getTimeoutSecs

      public int getTimeoutSecs()
      Description copied from interface: LogAlert
      How long should to display the alert for - this will be either the explicit value given when creating the alert, or a value determined from the client's behaviour and its configuration settings.
      Specified by:
      getTimeoutSecs in interface LogAlert
      Returns:
      How long to display the timeout for - 0 to display it indefinitely, otherwise it is the number of seconds to display the value for.
    • getPlainText

      public String getPlainText()
      Description copied from interface: LogAlert
      Returns the text of the message - this will have any formatting stripped out.
      Specified by:
      getPlainText in interface LogAlert
      Returns:
      The text to display.