org.elite.jdcbot.framework
Class EventDispatchThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.elite.jdcbot.framework.EventDispatchThread
All Implemented Interfaces:
java.lang.Runnable

Deprecated. This type of generalized class was not needed, but my hand was itching to code using reflection, i guess. Sorry.

public class EventDispatchThread
extends java.lang.Thread

Created on 27-May-08
The task of this class is to run a thread (jDCBot-EventDispatchThread), which can be used to call methods of various methods, making the code of those methods run in this thread, asynchornously from the calling method.

Since:
0.7
Version:
0.1.1
Author:
AppleGrew

Nested Class Summary
private  class EventDispatchThread.DispatchEntity
          Deprecated.  
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.util.List<EventDispatchThread.DispatchEntity> dispatch
          Deprecated.  
private  boolean running
          Deprecated.  
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EventDispatchThread()
          Deprecated.  
 
Method Summary
 void call(java.lang.Object owner, java.lang.String method, java.lang.Class[] param_types, java.lang.Object... args)
          Deprecated. Use this to invoke a call to a method via this (jDCBot-EventDispatchThread) thread, but you will also need to specify arguments' types in param_types argument.
 void run()
          Deprecated.  
 void stopIt()
          Deprecated.  
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dispatch

private java.util.List<EventDispatchThread.DispatchEntity> dispatch
Deprecated. 

running

private volatile boolean running
Deprecated. 
Constructor Detail

EventDispatchThread

public EventDispatchThread()
Deprecated. 
Method Detail

run

public void run()
Deprecated. 
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

call

public void call(java.lang.Object owner,
                 java.lang.String method,
                 java.lang.Class[] param_types,
                 java.lang.Object... args)
Deprecated. 
Use this to invoke a call to a method via this (jDCBot-EventDispatchThread) thread, but you will also need to specify arguments' types in param_types argument.

Parameters:
owner - The object of whom method is memeber.
method - The case-sensitive name of the method. This can be public only.
param_types - The array of arguments' types. Note:
  • If you need to supply any primitive data types e.g. int then pass its primitive class type. e.g. If you need to pass
    int i;
    then pass as its class type as shown below.
    new Class[]{int.class}
    There is no need for using PrimitiveWrapper.
args - All the arguments of the method.
Note:
  • If method has no arguments then no need to pass any any argument to this parameter, it is a varag and will automatically set to null.

stopIt

public void stopIt()
Deprecated.