2005/5/9

     
 

class ThreadGroup

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::ThreadGroup Class Reference

#include <ThreadGroup.h>

Inheritance diagram for acdk::lang::ThreadGroup:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

A ThreadGroup controls a group of threads.

Author:
Roger Rene Kommer
Version:
Revision
1.10
Date:
Date
2005/02/05 10:44:57


Public Member Functions

 ThreadGroup (IN(RString) name)
 create a new thread group on given name

 ThreadGroup (IN(RThreadGroup) parent, IN(RString) name)
 create a new thread group as child for given parent

int activeCount ()
 return the number of active threads in this thread group

int activeGroupCount ()
 return the number of active child threads groups in this thread group

void checkAccess ()
void destroy ()
 
Exceptions:
IllegalThreadStateException if (activeCount() != 0)


int enumerate (IN(RThreadArray) list, bool recursive=false)
 Fill list with all threads of this thread group.

int enumerate (IN(RThreadGroupArray) list, bool recursive=false)
 Fill list with all child threads groups of this thread group.

int getMaxPriority ()
 return the maximum priority of this thread group

RString getName ()
 return the name of this thread group

RThreadGroup getParent ()
 return the parent thread group.

bool isDaemon ()
 return true if this thread group is a deamon thread group

bool isDestroyed ()
void interrupt ()
void list ()
 Print threads to System::out.

bool parentOf (IN(RThreadGroup) group)
 return true if group is parent of this group

void setDaemon (bool on)
 set this thread group as deamon

void setMaxPriority (int prio)
 set the maximum priority of this thread group.

virtual RString toString ()
 return a string representation of this object Object::toString() return getName() by default

virtual void uncaughtException (IN(RThread) t, IN(RThrowable) e)
 will be called if a thread ends with uncatched exception


Static Public Member Functions

RThreadGroup getRoot ()
 return the root thread group (in which also the main-thread is running


Private Member Functions

 ThreadGroup ()
void _removeThread (IN(RThread) thread)
void _addThread (IN(RThread) thread)

Private Attributes

RThreadGroup _parent
RString _name
::acdk::util::RVector _children
::acdk::util::RVector _threads
int _maxPriority
bool _isDaemon

Static Private Attributes

RThreadGroup _root

Friends

class Thread


Constructor & Destructor Documentation

acdk::lang::ThreadGroup::ThreadGroup IN(RString name  ) 
 

create a new thread group on given name

acdk::lang::ThreadGroup::ThreadGroup IN(RThreadGroup parent,
IN(RString name
 

create a new thread group as child for given parent

acdk::lang::ThreadGroup::ThreadGroup  )  [private]
 


Member Function Documentation

void acdk::lang::ThreadGroup::_addThread IN(RThread thread  )  [private]
 

void acdk::lang::ThreadGroup::_removeThread IN(RThread thread  )  [private]
 

int acdk::lang::ThreadGroup::activeCount  ) 
 

return the number of active threads in this thread group

int acdk::lang::ThreadGroup::activeGroupCount  ) 
 

return the number of active child threads groups in this thread group

void acdk::lang::ThreadGroup::checkAccess  ) 
 

Deprecated:
has no functionality

void acdk::lang::ThreadGroup::destroy  ) 
 

Exceptions:
IllegalThreadStateException if (activeCount() != 0)

int acdk::lang::ThreadGroup::enumerate IN(RThreadGroupArray list,
bool  recursive = false
 

Fill list with all child threads groups of this thread group.

int acdk::lang::ThreadGroup::enumerate IN(RThreadArray list,
bool  recursive = false
 

Fill list with all threads of this thread group.

int acdk::lang::ThreadGroup::getMaxPriority  ) 
 

return the maximum priority of this thread group

RString acdk::lang::ThreadGroup::getName  )  [virtual]
 

return the name of this thread group

Reimplemented from acdk::lang::Object.

RThreadGroup acdk::lang::ThreadGroup::getParent  ) 
 

return the parent thread group.

It may return Nil if this thread group has no parent

RThreadGroup acdk::lang::ThreadGroup::getRoot  )  [static]
 

return the root thread group (in which also the main-thread is running

void acdk::lang::ThreadGroup::interrupt  ) 
 

Deprecated:
unsupported call

bool acdk::lang::ThreadGroup::isDaemon  ) 
 

return true if this thread group is a deamon thread group

bool acdk::lang::ThreadGroup::isDestroyed  ) 
 

Deprecated:
unsupported call

void acdk::lang::ThreadGroup::list  ) 
 

Print threads to System::out.

bool acdk::lang::ThreadGroup::parentOf IN(RThreadGroup group  ) 
 

return true if group is parent of this group

void acdk::lang::ThreadGroup::setDaemon bool  on  ) 
 

set this thread group as deamon

void acdk::lang::ThreadGroup::setMaxPriority int  prio  ) 
 

set the maximum priority of this thread group.

Todo:
has no functionality

virtual RString acdk::lang::ThreadGroup::toString  )  [virtual]
 

return a string representation of this object Object::toString() return getName() by default

Reimplemented from acdk::lang::Object.

virtual void acdk::lang::ThreadGroup::uncaughtException IN(RThread t,
IN(RThrowable e
[virtual]
 

will be called if a thread ends with uncatched exception


Friends And Related Function Documentation

friend class Thread [friend]
 


Member Data Documentation

::acdk::util::RVector acdk::lang::ThreadGroup::_children [private]
 

bool acdk::lang::ThreadGroup::_isDaemon [private]
 

int acdk::lang::ThreadGroup::_maxPriority [private]
 

RString acdk::lang::ThreadGroup::_name [private]
 

RThreadGroup acdk::lang::ThreadGroup::_parent [private]
 

RThreadGroup acdk::lang::ThreadGroup::_root [static, private]
 

::acdk::util::RVector acdk::lang::ThreadGroup::_threads [private]