Package com.biglybt.core.logging
Class LogAlert
- java.lang.Object
-
- com.biglybt.core.logging.LogAlert
-
-
Field Summary
Fields Modifier and Type Field Description static int
AT_ERROR
static int
AT_INFORMATION
static int
AT_WARNING
java.lang.String
details
int
entryType
java.lang.Throwable
err
boolean
forceNotify
java.lang.Object[]
relatedTo
A list of events that this entry is related toboolean
repeatable
static boolean
REPEATABLE
java.lang.String
text
int
timeoutSecs
static boolean
UNREPEATABLE
-
Fields inherited from interface com.biglybt.pif.logging.LogAlert
LT_ERROR, LT_INFORMATION, LT_WARNING
-
-
Constructor Summary
Constructors Constructor Description LogAlert(boolean repeatable, int type, java.lang.String text)
LogAlert(boolean repeatable, int type, java.lang.String text, int timeoutSecs)
LogAlert(boolean repeatable, int type, java.lang.String text, java.lang.Throwable err)
LogAlert(boolean repeatable, java.lang.String text, java.lang.Throwable err)
LogAlert(java.lang.Object[] relatedTo, boolean repeatable, int type, java.lang.String text)
LogAlert(java.lang.Object relatedTo, boolean repeatable, int type, java.lang.String text)
LogAlert(java.lang.Object relatedTo, boolean repeatable, java.lang.String text, java.lang.Throwable err)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]
getContext()
Returns the objects associated with the alert - this will return null if the alert isn't associated with such any objects.java.lang.Throwable
getError()
Returns the error associated with the alert - null if there is no error.int
getGivenTimeoutSecs()
How long should to display the alert for - this will be the value that was given when creating the alert.java.lang.String
getPlainText()
Returns the text of the message - this will have any formatting stripped out.java.lang.String
getText()
Returns the text of the message - this may include formatting tags (for example, hyperlinks).int
getTimeoutSecs()
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.int
getType()
Returns the log type of the alert - the value of which will be one of the LT_ constants defined above.
-
-
-
Field Detail
-
AT_INFORMATION
public static final int AT_INFORMATION
- See Also:
- Constant Field Values
-
AT_WARNING
public static final int AT_WARNING
- See Also:
- Constant Field Values
-
AT_ERROR
public static final int AT_ERROR
- See Also:
- Constant Field Values
-
REPEATABLE
public static final boolean REPEATABLE
- See Also:
- Constant Field Values
-
UNREPEATABLE
public static final boolean UNREPEATABLE
- See Also:
- Constant Field Values
-
entryType
public final int entryType
-
err
public java.lang.Throwable err
-
repeatable
public final boolean repeatable
-
text
public java.lang.String text
-
relatedTo
public java.lang.Object[] relatedTo
A list of events that this entry is related to
-
timeoutSecs
public int timeoutSecs
-
details
public java.lang.String details
-
forceNotify
public boolean forceNotify
-
-
Constructor Detail
-
LogAlert
public LogAlert(boolean repeatable, int type, java.lang.String text)
- Parameters:
type
-text
-repeatable
-
-
LogAlert
public LogAlert(boolean repeatable, int type, java.lang.String text, int timeoutSecs)
- Parameters:
type
-text
-repeatable
-timeoutSecs
- -1 -> use defaults 0 -> no timeout
-
LogAlert
public LogAlert(java.lang.Object[] relatedTo, boolean repeatable, int type, java.lang.String text)
-
LogAlert
public LogAlert(java.lang.Object relatedTo, boolean repeatable, int type, java.lang.String text)
-
LogAlert
public LogAlert(boolean repeatable, java.lang.String text, java.lang.Throwable err)
-
LogAlert
public LogAlert(boolean repeatable, int type, java.lang.String text, java.lang.Throwable err)
-
LogAlert
public LogAlert(java.lang.Object relatedTo, boolean repeatable, java.lang.String text, java.lang.Throwable err)
- Parameters:
downloadManagerImpl
-b
-string
-e
-
-
-
Method Detail
-
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 interfaceLogAlert
- 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 java.lang.String getText()
Description copied from interface:LogAlert
Returns the text of the message - this may include formatting tags (for example, hyperlinks).
-
getError
public java.lang.Throwable getError()
Description copied from interface:LogAlert
Returns the error associated with the alert - null if there is no error.
-
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.
-
getContext
public java.lang.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 interfaceLogAlert
-
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 interfaceLogAlert
- 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 java.lang.String getPlainText()
Description copied from interface:LogAlert
Returns the text of the message - this will have any formatting stripped out.- Specified by:
getPlainText
in interfaceLogAlert
- Returns:
- The text to display.
-
-