public interface ThreadProxy
This interface abstracts raw access to operating system-level threads. In a debugging environment these methods map to, for example, thread_db calls on Solaris (see /usr/include/thread_db.h) or the Win32 debugging API calls. In a runtime environment these might map directly to pthread calls.
Implementors of this interface must provide equals() and
hashCode() methods which work properly regardless of how the
ThreadProxy is obtained, in particular either through ThreadAccess
or the thread list provided
by CDebugger
. This allows
matching up of the OS's notion of the thread list of the target
process with any user-level lists that may be present (i.e., the
JavaThread list in the HotSpot VM).
Implementors of this interface should also provide a toString() which converts the ThreadProxy to a value easily recognizable in the platform's debugger. (For example, on Solaris, "t@<id>".)
FIXME: had to be renamed from "Thread" to avoid numerous clashes with java.lang.Thread -- would be nice to pick a more consistent name with the rest of the system.
Modifier and Type | Method and Description |
---|---|
boolean |
canSetContext()
Indicates whether calls to setContext() are valid.
|
ThreadContext |
getContext()
Retrieves the context for the given thread.
|
void |
setContext(ThreadContext context)
Sets the context for the given thread.
|
ThreadContext getContext() throws java.lang.IllegalThreadStateException
java.lang.IllegalThreadStateException
boolean canSetContext() throws DebuggerException
DebuggerException
void setContext(ThreadContext context) throws java.lang.IllegalThreadStateException, DebuggerException
java.lang.IllegalThreadStateException
DebuggerException
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.