Thread

public class Thread

The state of a thread.

Fields

client

protected final APIClient client

handle

protected long handle

Constructors

Thread

protected Thread(APIClient client)

Internal constructor

Methods

fromProtobuf

public static Thread fromProtobuf(APIClient client, Out.CocoThread inputValue)

Internal constructor

getException

public final io.cocotec.coco.platform.coco.Exception getException()

If this thread’s state is ThreadState::WithinTransitionRuntimeError, then the exception that this thread has hit.

getFrames

public final java.util.ArrayList<io.cocotec.coco.platform.coco.StackFrame> getFrames()

The thread’s control stack in the current snapshot.

getHandle

public final long getHandle()

getNextState

public final io.cocotec.coco.platform.coco.StateEnumValue getNextState()

If this thread represents a process, then the value of the implicit nextState variable. This will either represent the target state the transition moves to, or may represent the state we are currently in.

getProcess

public final io.cocotec.coco.platform.coco.BehaviouralInstance getProcess()

If this thread represents a process, then the instance that this value represents.

getState

public final io.cocotec.coco.platform.coco.ThreadState getState()

The state that this thread is currently in.

getThreadName

public final String getThreadName()

A name of this thread.

toString

public String toString()