Package com.biglybt.pif.logging
Interface LogAlert
- All Known Implementing Classes:
LogAlert
public interface LogAlert
A LogAlert represents a message that should be displayed to the
user.
Note: Only for implementation by Core, not plugins.
- Since:
- 3.1.1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Log Type: Errorstatic final int
Log Type: Informationstatic final int
Log Type: Warning -
Method Summary
Modifier and TypeMethodDescriptionObject[]
Returns the objects associated with the alert - this will return null if the alert isn't associated with such any objects.getError()
Returns the error associated with the alert - null if there is no error.int
How long should to display the alert for - this will be the value that was given when creating the alert.Returns the text of the message - this will have any formatting stripped out.getText()
Returns the text of the message - this may include formatting tags (for example, hyperlinks).int
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 Details
-
LT_INFORMATION
static final int LT_INFORMATIONLog Type: Information- See Also:
-
LT_WARNING
static final int LT_WARNINGLog Type: Warning- See Also:
-
LT_ERROR
static final int LT_ERRORLog Type: Error- See Also:
-
-
Method Details
-
getGivenTimeoutSecs
int getGivenTimeoutSecs()How long should to display the alert for - this will be the value that was given when creating the alert.- 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.
-
getTimeoutSecs
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.- 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.
-
getText
String getText()Returns the text of the message - this may include formatting tags (for example, hyperlinks).- Returns:
- The text to display.
-
getPlainText
String getPlainText()Returns the text of the message - this will have any formatting stripped out.- Returns:
- The text to display.
-
getError
Throwable getError()Returns the error associated with the alert - null if there is no error. -
getType
int getType()Returns the log type of the alert - the value of which will be one of the LT_ constants defined above. -
getContext
Object[] getContext()Returns the objects associated with the alert - this will return null if the alert isn't associated with such any objects.
-