spin.off
Class SpinOffEvaluator

java.lang.Object
  extended by spin.Evaluator
      extended by spin.off.SpinOffEvaluator

public class SpinOffEvaluator
extends Evaluator

An evaluator for spin-off, i.e. all invocations are evaluated on another thread than the EDT while further events are dispatched.

See Also:
Starter, DispatcherFactory

Constructor Summary
SpinOffEvaluator()
          Create an evaluator for spin-off using the default dispatcherFactory and starter.
SpinOffEvaluator(DispatcherFactory dispatcherFactory)
          Create an evaluator for spin-off using the default starter.
SpinOffEvaluator(DispatcherFactory dispatcherFactory, Starter starter)
          Create an evaluator for spin-off.
SpinOffEvaluator(Starter starter)
          Create an evaluator for spin-off using the default dispatcherFactory.
 
Method Summary
 void evaluate(Invocation invocation)
          Spin the given invocation off the EDT.
static DispatcherFactory getDefaultDispatcherFactory()
          Get the default dispatcher factory.
static Starter getDefaultStarter()
          Get the default starter.
static void setDefaultDispatcherFactory(DispatcherFactory dispatcherFactory)
          Set the default dispatcher factory.
static void setDefaultStarter(Starter starter)
          Set the default starter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpinOffEvaluator

public SpinOffEvaluator()
Create an evaluator for spin-off using the default dispatcherFactory and starter.

See Also:
setDefaultStarter(Starter), setDefaultDispatcherFactory(DispatcherFactory)

SpinOffEvaluator

public SpinOffEvaluator(DispatcherFactory dispatcherFactory)
Create an evaluator for spin-off using the default starter.

Parameters:
dispatcherFactory - factory of dispatchers
See Also:
setDefaultStarter(Starter)

SpinOffEvaluator

public SpinOffEvaluator(Starter starter)
Create an evaluator for spin-off using the default dispatcherFactory.

Parameters:
starter - starter
See Also:
setDefaultDispatcherFactory(DispatcherFactory)

SpinOffEvaluator

public SpinOffEvaluator(DispatcherFactory dispatcherFactory,
                        Starter starter)
Create an evaluator for spin-off.

Parameters:
dispatcherFactory - factory of dispatchers
starter - starter
Method Detail

evaluate

public final void evaluate(Invocation invocation)
                    throws java.lang.Throwable
Spin the given invocation off the EDT.

Specified by:
evaluate in class Evaluator
Parameters:
invocation - invocation to spin-off
Throws:
java.lang.Throwable

getDefaultDispatcherFactory

public static DispatcherFactory getDefaultDispatcherFactory()
Get the default dispatcher factory.

Returns:
default factory of dispatchers

setDefaultDispatcherFactory

public static void setDefaultDispatcherFactory(DispatcherFactory dispatcherFactory)
Set the default dispatcher factory.

Parameters:
dispatcherFactory - the factory of dispatchers to use as default

getDefaultStarter

public static Starter getDefaultStarter()
Get the default starter.

Returns:
default starter

setDefaultStarter

public static void setDefaultStarter(Starter starter)
Set the default starter.

Parameters:
starter - the starter to use as default


Copyright © 2007. All Rights Reserved.