Table of Contents

Class Thread

Namespace
Java.Lang
Assembly
MASES.JNet.dll
public class Thread : JVMBridgeBase<Thread>, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition
Inheritance
Thread
Implements
Derived
Extension Methods

Constructors

Thread()

public Thread()

Thread(Runnable)

public Thread(Runnable arg0)

Parameters

arg0 Runnable

Runnable

Thread(Runnable, String)

public Thread(Runnable arg0, String arg1)

Parameters

arg0 Runnable

Runnable

arg1 String

String

Thread(String)

public Thread(String arg0)

Parameters

arg0 String

String

Thread(ThreadGroup, Runnable)

public Thread(ThreadGroup arg0, Runnable arg1)

Parameters

arg0 ThreadGroup

ThreadGroup

arg1 Runnable

Runnable

Thread(ThreadGroup, Runnable, String)

public Thread(ThreadGroup arg0, Runnable arg1, String arg2)

Parameters

arg0 ThreadGroup

ThreadGroup

arg1 Runnable

Runnable

arg2 String

String

Thread(ThreadGroup, Runnable, String, long)

public Thread(ThreadGroup arg0, Runnable arg1, String arg2, long arg3)

Parameters

arg0 ThreadGroup

ThreadGroup

arg1 Runnable

Runnable

arg2 String

String

arg3 long

long

Thread(ThreadGroup, String)

public Thread(ThreadGroup arg0, String arg1)

Parameters

arg0 ThreadGroup

ThreadGroup

arg1 String

String

Thread(IJVMBridgeBaseInitializer)

Initializer used internally by JCOBridge. Do not use directly.

[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public Thread(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

Properties

AllStackTraces

public static Map<Thread, StackTraceElement[]> AllStackTraces { get; }

Property Value

Map<Thread, StackTraceElement[]>

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

ContextClassLoader

public ClassLoader ContextClassLoader { get; set; }

Property Value

ClassLoader

GetState

public Thread.State GetState { get; }

Property Value

Thread.State

Id

public long Id { get; }

Property Value

long

IsBridgeAbstract

true if the BridgeClassName is an abstract class, i.e. cannot be created an instance

public override bool IsBridgeAbstract { get; }

Property Value

bool

IsBridgeCloseable

true if the BridgeClassName implements java.lang.AutoCloseable

public override bool IsBridgeCloseable { get; }

Property Value

bool

IsBridgeInterface

true if the BridgeClassName is an interface, i.e. does not have any public constructor

public override bool IsBridgeInterface { get; }

Property Value

bool

IsBridgeStatic

true if the BridgeClassName is a static class, i.e. does not have any public constructor

public override bool IsBridgeStatic { get; }

Property Value

bool

MAX_PRIORITY

public static int MAX_PRIORITY { get; set; }

Property Value

int

MIN_PRIORITY

public static int MIN_PRIORITY { get; set; }

Property Value

int

NORM_PRIORITY

public static int NORM_PRIORITY { get; set; }

Property Value

int

Name

public String Name { get; set; }

Property Value

String

Priority

public int Priority { get; set; }

Property Value

int

StackTrace

public StackTraceElement[] StackTrace { get; }

Property Value

StackTraceElement[]

ThreadGroup

public ThreadGroup ThreadGroup { get; }

Property Value

ThreadGroup

Methods

ActiveCount()

public static int ActiveCount()

Returns

int

int

CheckAccess()

public void CheckAccess()

CountStackFrames()

[Obsolete("Deprecated in JVM")]
public int CountStackFrames()

Returns

int

int

CreatePoolableInstance()

HPA initializer for Thread()

public static Thread CreatePoolableInstance()

Returns

Thread

CreatePoolableInstance(Runnable)

HPA initializer for Thread(Java.Lang.Runnable arg0)

public static Thread CreatePoolableInstance(Runnable arg0)

Parameters

arg0 Runnable

Returns

Thread

CreatePoolableInstance(Runnable, String)

HPA initializer for Thread(Java.Lang.Runnable arg0, Java.Lang.String arg1)

public static Thread CreatePoolableInstance(Runnable arg0, String arg1)

Parameters

arg0 Runnable
arg1 String

Returns

Thread

CreatePoolableInstance(String)

HPA initializer for Thread(Java.Lang.String arg0)

public static Thread CreatePoolableInstance(String arg0)

Parameters

arg0 String

Returns

Thread

CreatePoolableInstance(ThreadGroup, Runnable)

HPA initializer for Thread(Java.Lang.ThreadGroup arg0, Java.Lang.Runnable arg1)

public static Thread CreatePoolableInstance(ThreadGroup arg0, Runnable arg1)

Parameters

arg0 ThreadGroup
arg1 Runnable

Returns

Thread

CreatePoolableInstance(ThreadGroup, Runnable, String)

HPA initializer for Thread(Java.Lang.ThreadGroup arg0, Java.Lang.Runnable arg1, Java.Lang.String arg2)

public static Thread CreatePoolableInstance(ThreadGroup arg0, Runnable arg1, String arg2)

Parameters

arg0 ThreadGroup
arg1 Runnable
arg2 String

Returns

Thread

CreatePoolableInstance(ThreadGroup, Runnable, String, long)

HPA initializer for Thread(Java.Lang.ThreadGroup arg0, Java.Lang.Runnable arg1, Java.Lang.String arg2, long arg3)

public static Thread CreatePoolableInstance(ThreadGroup arg0, Runnable arg1, String arg2, long arg3)

Parameters

arg0 ThreadGroup
arg1 Runnable
arg2 String
arg3 long

Returns

Thread

CreatePoolableInstance(ThreadGroup, String)

HPA initializer for Thread(Java.Lang.ThreadGroup arg0, Java.Lang.String arg1)

public static Thread CreatePoolableInstance(ThreadGroup arg0, String arg1)

Parameters

arg0 ThreadGroup
arg1 String

Returns

Thread

CurrentThread()

public static Thread CurrentThread()

Returns

Thread

Thread

Destroy()

[Obsolete("Deprecated in JVM")]
public void Destroy()

DumpStack()

public static void DumpStack()

Enumerate(Thread[])

public static int Enumerate(Thread[] arg0)

Parameters

arg0 Thread[]

Thread

Returns

int

int

HoldsLock(object)

public static bool HoldsLock(object arg0)

Parameters

arg0 object

object

Returns

bool

bool

Interrupt()

public void Interrupt()

Interrupted()

public static bool Interrupted()

Returns

bool

bool

IsAlive()

public bool IsAlive()

Returns

bool

bool

IsDaemon()

public bool IsDaemon()

Returns

bool

bool

IsInterrupted()

public bool IsInterrupted()

Returns

bool

bool

Join()

public void Join()

Exceptions

InterruptedException

Join(long)

public void Join(long arg0)

Parameters

arg0 long

long

Exceptions

InterruptedException

Join(long, int)

public void Join(long arg0, int arg1)

Parameters

arg0 long

long

arg1 int

int

Exceptions

InterruptedException

Resume()

[Obsolete("Deprecated in JVM")]
public void Resume()

Run()

public void Run()

SetDaemon(bool)

public void SetDaemon(bool arg0)

Parameters

arg0 bool

bool

SetUncaughtExceptionHandler(UncaughtExceptionHandler)

Set the handler invoked when this thread abruptly terminates due to an uncaught exception.

public void SetUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)

Parameters

eh Thread.UncaughtExceptionHandler

The object to use as this thread's uncaught exception handler. If null then this thread has no explicit handler.

Sleep(long)

public static void Sleep(long arg0)

Parameters

arg0 long

long

Exceptions

InterruptedException

Sleep(long, int)

public static void Sleep(long arg0, int arg1)

Parameters

arg0 long

long

arg1 int

int

Exceptions

InterruptedException

Start()

public void Start()

Stop()

[Obsolete("Deprecated in JVM")]
public void Stop()

Stop(JVMBridgeException)

[Obsolete("Deprecated in JVM")]
public void Stop(JVMBridgeException arg0)

Parameters

arg0 JVMBridgeException

Throwable

Suspend()

[Obsolete("Deprecated in JVM")]
public void Suspend()

Yield()

public static void Yield()

Operators

implicit operator Runnable(Thread)

Converter from Thread to Runnable

public static implicit operator Runnable(Thread t)

Parameters

t Thread

Returns

Runnable