02/28/2005
 

com.epicentric.common
Class AnonymousThread

java.lang.Object
  |
  +--com.epicentric.common.AnonymousThread
All Implemented Interfaces:
Runnable

Deprecated. as of version 4.5, to be removed in 8.0 or later. No replacement.

public abstract class AnonymousThread
extends Object
implements Runnable

Abstract class that anonymous classes can extend to pass in parameters. Example of using this class to do a threaded delete of a user:

   //... within some class ...
   AnonymousThread deleter = new AnonymousThread() {
       public void run() {
           int id = ((Integer) getParameter("id")).intValue();
	         UserUtils.deleteUser(id);
	     }
	 };
	deleter.setParameter("id", new Integer(user.getID()));
	new Thread(deleter).start();
 


Constructor Summary
AnonymousThread()
          Deprecated.  
 
Method Summary
 Object getFirstParameter()
          Deprecated. Returns the first parameter set by setParameter(String name, Object value)
 Object getParameter(String name)
          Deprecated. Returns the specified parameter
 void setParameter(String name, Object value)
          Deprecated. Sets a parameter key/value pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

AnonymousThread

public AnonymousThread()
Deprecated. 
Method Detail

setParameter

public void setParameter(String name,
                         Object value)
Deprecated. 
Sets a parameter key/value pair
Parameters:
name - Parameter's key
value - Parameter's value

getParameter

public Object getParameter(String name)
Deprecated. 
Returns the specified parameter
Parameters:
name - Key for the parameter to get
Returns:
Value of the specified parameter, or null if no parameter is found of that name

getFirstParameter

public Object getFirstParameter()
Deprecated. 
Returns the first parameter set by setParameter(String name, Object value)
Returns:
Value of the first parameter, or null if no parameter is found of that name

02/28/2005
 

Copyright and Trademark Notices