uk.ac.man.bioinf.apps.invoker
Class Invoker

java.lang.Object
  |
  +--uk.ac.man.bioinf.apps.invoker.Invoker
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
AnonInvoker

public abstract class Invoker
extends Object
implements Runnable

Invoker.java This class another attempt at making the sytem event queue easier in Swing. This class is meant to be used an a base implementation of runnable with a few alternative constructors, and utility methods. Its meant to be extended probably as an anonymous class to actually provide any degree of functionality. This class was originally called the "SlowInvoker". The reasons for the "Slow" are entirely historical, and relatively inappropriate. Created: Mon Dec 07 13:17:00 1998

Version:
$Id: Invoker.java,v 1.3 2001/04/11 17:04:42 lord Exp $
Author:
Phillip Lord

Constructor Summary
Invoker()
          Pointless constructor provided for the hell of it.
Invoker(Object source)
          Less Pointless constructor.
Invoker(Object source, Object param)
          Even more less pointless contstructor Takes a param to be used later as a parameter for the method which will be called on what is proably going to be the source.
 
Method Summary
abstract  void doRun()
           
 Object getParameter()
          Get the parameter
 Object getParameter(int index)
          Get the parameter specified by the given index.
 Object getSource()
          Get the source
 void run()
           
 void setExceptionHandler(ExceptionHandler handle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Invoker

public Invoker()
Pointless constructor provided for the hell of it. Might as well extend Runnable directly if you use this.


Invoker

public Invoker(Object source)
Less Pointless constructor. Takes a parameter which is meant to be the source on the anonymous class although you could clearly use it for whatever you choose

Parameters:
source - the source or whatever you choose

Invoker

public Invoker(Object source,
               Object param)
Even more less pointless contstructor Takes a param to be used later as a parameter for the method which will be called on what is proably going to be the source. If you want to pass more than one parameter then do it thru here as an array. Type checking checking hell!

Parameters:
source - the source or whatever you chose
param - the param or whatever you choose
Method Detail

run

public void run()
Specified by:
run in interface Runnable

doRun

public abstract void doRun()

getSource

public Object getSource()
Get the source

Returns:
the source object

getParameter

public Object getParameter()
Get the parameter

Returns:
the parameter object

getParameter

public Object getParameter(int index)
Get the parameter specified by the given index. Note this requires a cast to an array, so if this doesnt work you'll get a runtime exception

Parameters:
index - the index of the parameter to be returned

setExceptionHandler

public void setExceptionHandler(ExceptionHandler handle)