|
MADARA
3.1.8
|
A facade for a user-defined Java thread class. More...
#include <JavaThread.h>


Public Member Functions | |
| ~JavaThread () | |
| Destructor. More... | |
| bool | check_compliance (jobject obj) |
| Checks a Java object for compliance with com.madara.threads.BaseThread. More... | |
| virtual void | cleanup (void) |
| Calls the Java cleanup method. More... | |
| virtual void | init (knowledge::KnowledgeBase &context) |
| Initializes Java thread with MADARA context. More... | |
| void | operator= (const JavaThread &rhs) |
| Assignment operator. More... | |
| virtual void | run (void) |
| Executes the Java thread's logic. More... | |
Static Public Member Functions | |
| static JavaThread * | create (jobject obj) |
| Creates a JavaThread. More... | |
Protected Member Functions | |
| JavaThread () | |
| Constructor. More... | |
| virtual void | init_control_vars (knowledge::KnowledgeBase &control) |
| Initializes the Java thread implementation's control plane variables. More... | |
Protected Attributes | |
| jclass | class_ |
| the class of the Java object obj_ More... | |
| jmethodID | cleanup_method_ |
| handle to the cleanup method More... | |
| jmethodID | init_method_ |
| handle to the init method More... | |
| std::string | name |
| The unique name of your thread. More... | |
| jobject | obj_ |
| the Java thread implementation of com.madara.threads.BaseThread More... | |
| madara::knowledge::containers::Integer | paused |
| thread safe paused flag that may be set by the Threader More... | |
| jmethodID | run_method_ |
| handle to the run method More... | |
| madara::knowledge::containers::Integer | terminated |
| thread safe terminated flag that may be set by the Threader base More... | |
A facade for a user-defined Java thread class.
Definition at line 26 of file JavaThread.h.
| madara::threads::JavaThread::~JavaThread | ( | ) |
Destructor.
Definition at line 16 of file JavaThread.cpp.
|
protected |
Constructor.
Definition at line 10 of file JavaThread.cpp.
| bool madara::threads::JavaThread::check_compliance | ( | jobject | obj | ) |
Checks a Java object for compliance with com.madara.threads.BaseThread.
Fills in class members if compliant.
| obj | a user-defined com.madara.threads.BaseThread object |
Definition at line 135 of file JavaThread.cpp.
|
virtual |
Calls the Java cleanup method.
Reimplemented from madara::threads::BaseThread.
Definition at line 76 of file JavaThread.cpp.
|
static |
Creates a JavaThread.
The obj is checked for compliance before returning a JavaThread.
| obj | a user-defined com.madara.threads.BaseThread object |
Definition at line 121 of file JavaThread.cpp.
|
virtual |
Initializes Java thread with MADARA context.
| context | context for querying current program state |
Reimplemented from madara::threads::BaseThread.
Definition at line 89 of file JavaThread.cpp.
|
protectedvirtual |
Initializes the Java thread implementation's control plane variables.
| control | the control plane between Threader and threads |
Reimplemented from madara::threads::BaseThread.
Definition at line 229 of file JavaThread.cpp.
| void madara::threads::JavaThread::operator= | ( | const JavaThread & | rhs | ) |
Assignment operator.
Definition at line 33 of file JavaThread.cpp.
|
virtual |
Executes the Java thread's logic.
Implements madara::threads::BaseThread.
Definition at line 63 of file JavaThread.cpp.
|
protected |
the class of the Java object obj_
Definition at line 88 of file JavaThread.h.
|
protected |
handle to the cleanup method
Definition at line 97 of file JavaThread.h.
|
protected |
handle to the init method
Definition at line 94 of file JavaThread.h.
|
protectedinherited |
The unique name of your thread.
Definition at line 96 of file BaseThread.h.
|
protected |
the Java thread implementation of com.madara.threads.BaseThread
Definition at line 85 of file JavaThread.h.
|
protectedinherited |
thread safe paused flag that may be set by the Threader
Definition at line 107 of file BaseThread.h.
|
protected |
handle to the run method
Definition at line 91 of file JavaThread.h.
|
protectedinherited |
thread safe terminated flag that may be set by the Threader base
Definition at line 102 of file BaseThread.h.