HandlerThread Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A Thread
that has a Looper
.
[Android.Runtime.Register("android/os/HandlerThread", DoNotGenerateAcw=true)]
public class HandlerThread : Java.Lang.Thread
[<Android.Runtime.Register("android/os/HandlerThread", DoNotGenerateAcw=true)>]
type HandlerThread = class
inherit Thread
- Inheritance
- Attributes
Remarks
A Thread
that has a Looper
. The Looper
can then be used to create Handler
s.
Note that just like with a regular Thread
, #start()
must still be called.
Java documentation for android.os.HandlerThread
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
HandlerThread(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
HandlerThread(String, Int32) |
Constructs a HandlerThread. |
HandlerThread(String) |
Constructs a HandlerThread. |
Fields
MaxPriority |
The maximum priority that a thread can have. (Inherited from Thread) |
MinPriority |
The minimum priority that a thread can have. (Inherited from Thread) |
NormPriority |
The default priority that is assigned to a thread. (Inherited from Thread) |
Properties
Class |
Returns the runtime class of this |
ContextClassLoader |
Returns the context |
Daemon |
Tests if this thread is a daemon thread. -or- Marks this thread as either a #isDaemon daemon thread or a user thread. (Inherited from Thread) |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
Id |
Returns the identifier of this Thread. (Inherited from Thread) |
IsAlive |
Tests if this thread is alive. (Inherited from Thread) |
IsInterrupted |
Tests whether this thread has been interrupted. (Inherited from Thread) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
Looper |
This method returns the Looper associated with this thread. |
Name |
Returns this thread's name. -or- Changes the name of this thread to be equal to the argument |
PeerReference | (Inherited from Object) |
Priority |
Returns this thread's priority. -or- Changes the priority of this thread. (Inherited from Thread) |
ThreadGroup |
Returns the thread group to which this thread belongs. (Inherited from Thread) |
ThreadId |
Returns the identifier of this thread. |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
UncaughtExceptionHandler |
Returns the handler invoked when this thread abruptly terminates due to an uncaught exception. -or- Set the handler invoked when this thread abruptly terminates due to an uncaught exception. (Inherited from Thread) |
Methods
CheckAccess() |
Determines if the currently running thread has permission to modify this thread. (Inherited from Thread) |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
CountStackFrames() |
Obsolete.
Counts the number of stack frames in this thread. (Inherited from Thread) |
Destroy() |
Obsolete.
Throws |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetStackTrace() |
Returns an array of stack trace elements representing the stack dump of this thread. (Inherited from Thread) |
GetState() |
Returns the state of this thread. (Inherited from Thread) |
Interrupt() |
Interrupts this thread. (Inherited from Thread) |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Join() |
Waits for this thread to die. (Inherited from Thread) |
Join(Int64, Int32) |
Waits at most |
Join(Int64) |
Waits at most |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
OnLooperPrepared() |
Call back method that can be explicitly overridden if needed to execute some setup before Looper loops. |
Quit() |
Quits the handler thread's looper. |
QuitSafely() |
Quits the handler thread's looper safely. |
Resume() |
Obsolete.
Throws |
Run() |
If this thread was constructed using a separate
|
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
Start() |
Causes this thread to begin execution; the Java Virtual Machine
calls the |
Stop() |
Obsolete.
Throws |
Stop(Throwable) |
Obsolete.
Throws |
Suspend() |
Obsolete.
Throws |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |