-
- All Implemented Interfaces:
-
com.bugsnag.android.JsonStream.Streamable
public class Thread implements JsonStream.Streamable
A representation of a thread recorded in an Event
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumThread.StateThe state of a reported Thread. These states correspond directly to java.lang.Thread.State, except for
{@code UNKNOWN}which indicates thata state could not be captured or mapped.
-
Method Summary
Modifier and Type Method Description voidsetId(@NonNull() String id)Sets the unique ID of the thread (from java.lang.Thread) StringgetId()Gets the unique ID of the thread (from java.lang.Thread) voidsetName(@NonNull() String name)Sets the name of the thread (from java.lang.Thread) StringgetName()Gets the name of the thread (from java.lang.Thread) voidsetType(@NonNull() ErrorType type)Sets the type of thread based on the originating platform (intended for internal use only) ErrorTypegetType()Gets the type of thread based on the originating platform (intended for internal use only) voidsetState(@NonNull() Thread.State threadState)Sets the state of thread (from java.lang.Thread) Thread.StategetState()Gets the state of the thread (from java.lang.Thread) booleangetErrorReportingThread()Gets whether the thread was the thread that caused the event voidsetStacktrace(@NonNull() List<Stackframe> stacktrace)Sets a representation of the thread's stacktrace List<Stackframe>getStacktrace()Gets a representation of the thread's stacktrace StackframeaddStackframe(@Nullable() String method, @Nullable() String file, long lineNumber)Add a new stackframe to the end of this thread returning the new Stackframe data object. voidtoStream(@NonNull() JsonStream stream)-
-
Method Detail
-
setId
void setId(@NonNull() String id)
Sets the unique ID of the thread (from java.lang.Thread)
-
getId
@NonNull() String getId()
Gets the unique ID of the thread (from java.lang.Thread)
-
setName
void setName(@NonNull() String name)
Sets the name of the thread (from java.lang.Thread)
-
getName
@NonNull() String getName()
Gets the name of the thread (from java.lang.Thread)
-
setType
void setType(@NonNull() ErrorType type)
Sets the type of thread based on the originating platform (intended for internal use only)
-
getType
@NonNull() ErrorType getType()
Gets the type of thread based on the originating platform (intended for internal use only)
-
setState
void setState(@NonNull() Thread.State threadState)
Sets the state of thread (from java.lang.Thread)
-
getState
@NonNull() Thread.State getState()
Gets the state of the thread (from java.lang.Thread)
-
getErrorReportingThread
boolean getErrorReportingThread()
Gets whether the thread was the thread that caused the event
-
setStacktrace
void setStacktrace(@NonNull() List<Stackframe> stacktrace)
Sets a representation of the thread's stacktrace
-
getStacktrace
@NonNull() List<Stackframe> getStacktrace()
Gets a representation of the thread's stacktrace
-
addStackframe
@NonNull() Stackframe addStackframe(@Nullable() String method, @Nullable() String file, long lineNumber)
Add a new stackframe to the end of this thread returning the new Stackframe data object.
-
toStream
void toStream(@NonNull() JsonStream stream)
-
-
-
-