spin.off

Class 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 spin.Evaluator

evaluate

Constructor Details

SpinOffEvaluator

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

SpinOffEvaluator

public SpinOffEvaluator(DispatcherFactory dispatcherFactory)
Create an evaluator for spin-off using the default starter.
Parameters:
dispatcherFactory - factory of dispatchers

SpinOffEvaluator

public SpinOffEvaluator(DispatcherFactory dispatcherFactory,
                        Starter starter)
Create an evaluator for spin-off.
Parameters:
dispatcherFactory - factory of dispatchers
starter - starter

SpinOffEvaluator

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

Method Details

evaluate

public final void evaluate(Invocation invocation)
            throws Throwable
Spin the given invocation off the EDT.
Overrides:
evaluate in interface Evaluator
Parameters:
invocation - invocation to spin-off

getDefaultDispatcherFactory

public static DispatcherFactory getDefaultDispatcherFactory()
Get the default dispatcher factory.
Returns:
default factory of dispatchers

getDefaultStarter

public static Starter getDefaultStarter()
Get the default starter.
Returns:
default starter

setDefaultDispatcherFactory

public static void setDefaultDispatcherFactory(DispatcherFactory dispatcherFactory)
Set the default dispatcher factory.
Parameters:
dispatcherFactory - the factory of dispatchers to use as default

setDefaultStarter

public static void setDefaultStarter(Starter starter)
Set the default starter.
Parameters:
starter - the starter to use as default